GCSBucket
Checks the contents of a GCP bucket for size, age and count.
See Folder for a full description.
gcs-folder-check.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: gcs-bucket-check
spec:
interval: 30
spec:
folder:
- name: gcs auth test
path: gcs://somegcsbucket
minCount: 5
Field | Description | Scheme | Required |
---|---|---|---|
name |
Name of the check | string | Yes |
path |
A path to a GCS bucket and folder e.g. gcs://bucket/folder |
string | Yes |
gcpConnection |
Connection details for GCP | GCPConnection | |
* |
All other fields available in the folder check | Folder | |
* |
All other common fields | Common | |
Connection | |||
connection |
Path of an existing connection e.g. connection://aws/instance /. Mutually exclusive with credentials |
Connection | |
credentials |
GCP Access Token File. Mutually exclusive with connection |
EnvVar | Yes |
Connecting to GCP
There are 3 options when connecting to GCP:
- GKE workload identity (the default if no
connection
orcredentials
is specified) connection
, this is the recommended method, connections are reusable and secure
aws-connection.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: database-backup-check
spec:
interval: 60
folder:
- name: gcs auth test
path: gcs://somegcsbucket
gcpConnection:
connection: connection://gcp/internal
accessKey
andsecretKey
EnvVar with the credentials stored in a secret.
aws.yaml
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: database-backup-check
spec:
interval: 60
folder:
- name: gcs auth test
path: gcs://somegcsbucket
gcpConnection:
credentials:
valueFrom:
secretKeyRef:
name: gcp-credentials
key: AUTH_ACCESS_TOKEN