diff --git a/fixtures/aws/s3_bucket_pass.yaml b/fixtures/aws/s3_bucket_pass.yaml index af9a35378..1d79ccb3c 100644 --- a/fixtures/aws/s3_bucket_pass.yaml +++ b/fixtures/aws/s3_bucket_pass.yaml @@ -8,7 +8,8 @@ spec: schedule: "@every 5m" folder: # Check for any backup not older than 7 days and min size 25 bytes - - path: s3://flanksource-public + - name: folder check + path: s3://flanksource-public awsConnection: region: eu-central-1 minSize: 50M diff --git a/fixtures/datasources/GCP/database_backup.yaml b/fixtures/datasources/GCP/database_backup.yaml index 7860dad08..e74961658 100644 --- a/fixtures/datasources/GCP/database_backup.yaml +++ b/fixtures/datasources/GCP/database_backup.yaml @@ -7,6 +7,6 @@ spec: databaseBackup: - name: backup maxAge: 6h - GCP: + gcp: project: google-project-name instance: cloudsql-instance-name diff --git a/fixtures/datasources/GCP/database_backup_cred.yaml b/fixtures/datasources/GCP/database_backup_cred.yaml new file mode 100644 index 000000000..a7ef2071b --- /dev/null +++ b/fixtures/datasources/GCP/database_backup_cred.yaml @@ -0,0 +1,18 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: database-backup-example +spec: + schedule: "@every 5m" + databaseBackup: + - name: backup + maxAge: 6h + gcp: + project: google-project-name + instance: cloudsql-instance-name + gcpConnection: + credentials: + valueFrom: + secretKeyRef: + name: gcp-credentials + key: AUTH_ACCESS_TOKEN diff --git a/fixtures/datasources/GCP/database_backup_cred_from_connection.yaml b/fixtures/datasources/GCP/database_backup_cred_from_connection.yaml new file mode 100644 index 000000000..365771ecc --- /dev/null +++ b/fixtures/datasources/GCP/database_backup_cred_from_connection.yaml @@ -0,0 +1,14 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: database-backup-example +spec: + schedule: "@every 5m" + databaseBackup: + - name: backup + maxAge: 6h + gcp: + project: google-project-name + instance: cloudsql-instance-name + gcpConnection: + connection: connection://gcp/internal diff --git a/fixtures/datasources/folder_single_pass.yaml b/fixtures/datasources/folder_single_pass.yaml new file mode 100644 index 000000000..5d77edcf3 --- /dev/null +++ b/fixtures/datasources/folder_single_pass.yaml @@ -0,0 +1,11 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: folder-check +spec: + schedule: "@every 5m" + folder: + - path: /etc/ + name: folder-check-min + description: Checks if there are at least 10 files in the folder + minCount: 10 \ No newline at end of file diff --git a/fixtures/datasources/folder_with_filter.yaml b/fixtures/datasources/folder_with_filter.yaml new file mode 100644 index 000000000..81e6a879c --- /dev/null +++ b/fixtures/datasources/folder_with_filter.yaml @@ -0,0 +1,13 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: folder-check +spec: + schedule: "@every 5m" + folder: + - name: pg-backup checks + path: /data/backups + filter: + regex: "pg-backups-.*.zip" + maxAge: 1d # require a daily backup + minSize: 10mb # the backup should be at least 10mb diff --git a/fixtures/datasources/postgres.yaml b/fixtures/datasources/postgres.yaml index a9786c108..f55876741 100644 --- a/fixtures/datasources/postgres.yaml +++ b/fixtures/datasources/postgres.yaml @@ -3,7 +3,7 @@ kind: Canary metadata: name: postgres-check spec: - interval: 30 + schedule: '@every 30s' postgres: # or mysql, mssql - name: postgres schemas check url: "postgres://$(username):$(password)@postgres.default.svc:5432/postgres?sslmode=disable" diff --git a/fixtures/datasources/smb_check.yaml b/fixtures/datasources/smb_check.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/fixtures/external/catalog.yaml b/fixtures/external/catalog.yaml index f4a61ae0b..0ac951381 100644 --- a/fixtures/external/catalog.yaml +++ b/fixtures/external/catalog.yaml @@ -3,7 +3,7 @@ kind: Canary metadata: name: node-catalogs spec: - interval: 30 + schedule: '@every 30s' catalog: - name: ingress-catalog-check selector: diff --git a/fixtures/external/crossplane-kubernetes-resource.yaml b/fixtures/external/crossplane-kubernetes-resource.yaml index 0d3341fea..81df91999 100644 --- a/fixtures/external/crossplane-kubernetes-resource.yaml +++ b/fixtures/external/crossplane-kubernetes-resource.yaml @@ -30,7 +30,7 @@ spec: bucketName: "{{ (index .resources 0).Object.metadata.name }}" objectPath: dummy region: "{{ (index .resources 0).Object.spec.forProvider.locationConstraint }}" - endpoint: http://localstack-localstack.localstack.svc.cluster.local:4566 + url: http://localstack-localstack.localstack.svc.cluster.local:4566 usePathStyle: true accessKey: value: test diff --git a/fixtures/k8s/helm_check.yaml b/fixtures/k8s/helm_check.yaml new file mode 100644 index 000000000..3b55a1eca --- /dev/null +++ b/fixtures/k8s/helm_check.yaml @@ -0,0 +1,21 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: helm-check +spec: + schedule: '@every 30s' + helm: + - name: helm check + chartmuseum: http://chartmuseum.default:8080 + project: library + auth: + username: + valueFrom: + secretKeyRef: + name: helm-credentials + key: USERNAME + password: + valueFrom: + secretKeyRef: + name: helm-credentials + key: PASSWORD diff --git a/fixtures/k8s/http_auth_configmap.yaml b/fixtures/k8s/http_auth_configmap.yaml index b207f445d..aff353558 100644 --- a/fixtures/k8s/http_auth_configmap.yaml +++ b/fixtures/k8s/http_auth_configmap.yaml @@ -5,7 +5,8 @@ metadata: namespace: canaries spec: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + - name: http basic auth check + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [200] username: valueFrom: diff --git a/fixtures/k8s/http_auth_secret.yaml b/fixtures/k8s/http_auth_secret.yaml index e48cf68bc..a4999c7fb 100644 --- a/fixtures/k8s/http_auth_secret.yaml +++ b/fixtures/k8s/http_auth_secret.yaml @@ -5,7 +5,8 @@ metadata: namespace: canaries spec: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + - name: http basic auth check + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [200] username: valueFrom: diff --git a/fixtures/minimal/containerd-pull.yaml b/fixtures/minimal/containerd-pull.yaml index 8ff78c0e6..2df2689b5 100644 --- a/fixtures/minimal/containerd-pull.yaml +++ b/fixtures/minimal/containerd-pull.yaml @@ -3,7 +3,7 @@ kind: Canary metadata: name: containerd-pull-check spec: - interval: 30 + schedule: '@every 30s' containerd: # use docker if running outside kubernetes / docker - name: pull image image: docker.io/library/busybox:1.31.1 diff --git a/fixtures/minimal/containerd-push.yaml b/fixtures/minimal/containerd-push.yaml index 625db8d7b..55afbfd29 100644 --- a/fixtures/minimal/containerd-push.yaml +++ b/fixtures/minimal/containerd-push.yaml @@ -3,7 +3,7 @@ kind: Canary metadata: name: containerd-push-check spec: - interval: 30 + schedule: '@every 30s' containerdPush: # use dockerPush if running outside kubernetes / docker - name: ContainerdPush Check image: docker.io/library/busybox:1.31.1 diff --git a/fixtures/minimal/http_auth.yaml b/fixtures/minimal/http_auth.yaml index 4a89b5504..4c302c71a 100644 --- a/fixtures/minimal/http_auth.yaml +++ b/fixtures/minimal/http_auth.yaml @@ -5,10 +5,10 @@ metadata: spec: http: - name: "basic auth fail" - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [401] - name: "basic auth pass" - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [200] username: valueFrom: diff --git a/fixtures/minimal/http_auth_static_pass.yaml b/fixtures/minimal/http_auth_static_pass.yaml index 0082d724f..98116059b 100644 --- a/fixtures/minimal/http_auth_static_pass.yaml +++ b/fixtures/minimal/http_auth_static_pass.yaml @@ -5,10 +5,10 @@ metadata: spec: http: - name: "basic auth fail" - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [401] - name: "basic auth pass" - endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world responseCodes: [200] username: value: hello diff --git a/fixtures/minimal/http_fail.yaml b/fixtures/minimal/http_fail.yaml index 121a9838c..3ab0ea472 100644 --- a/fixtures/minimal/http_fail.yaml +++ b/fixtures/minimal/http_fail.yaml @@ -7,10 +7,10 @@ metadata: spec: schedule: "@every 5m" http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/500 + - url: https://httpbin.demo.aws.flanksource.com/status/500 name: http fail response code check responseCodes: [200] - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: http fail test expr check display: expr: string(code) + " should be 500" diff --git a/fixtures/minimal/http_pass.yaml b/fixtures/minimal/http_pass.yaml index 17c46789c..5de6e0be9 100644 --- a/fixtures/minimal/http_pass.yaml +++ b/fixtures/minimal/http_pass.yaml @@ -7,7 +7,7 @@ metadata: spec: schedule: "@every 5m" http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: http-deprecated-endpoint - name: http-minimal-check url: https://httpbin.demo.aws.flanksource.com/status/200 diff --git a/fixtures/minimal/http_single_pass.yaml b/fixtures/minimal/http_single_pass.yaml index b3ca9d22c..b0e93769d 100644 --- a/fixtures/minimal/http_single_pass.yaml +++ b/fixtures/minimal/http_single_pass.yaml @@ -8,7 +8,7 @@ spec: schedule: "@every 5m" http: - name: http pass response 200 status code - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + url: https://httpbin.demo.aws.flanksource.com/status/200 thresholdMillis: 3000 responseCodes: [200] maxSSLExpiry: 7 diff --git a/fixtures/minimal/http_template.yaml b/fixtures/minimal/http_template.yaml index b23bf3882..1b85a55c5 100644 --- a/fixtures/minimal/http_template.yaml +++ b/fixtures/minimal/http_template.yaml @@ -6,7 +6,7 @@ spec: schedule: "@every 5m" http: - name: templated-http - endpoint: https://webhook.site/#!/9f1392a6-718a-4ef5-a8e2-bfb55b08afca/f93d307b-0aaf-4a38-b9b3-db5daaae5657/1 + url: https://webhook.site/#!/9f1392a6-718a-4ef5-a8e2-bfb55b08afca/f93d307b-0aaf-4a38-b9b3-db5daaae5657/1 responseCodes: [200] templateBody: true envVar: diff --git a/fixtures/minimal/http_timeout_fail.yaml b/fixtures/minimal/http_timeout_fail.yaml index a8df27b0b..1b89d1d6f 100644 --- a/fixtures/minimal/http_timeout_fail.yaml +++ b/fixtures/minimal/http_timeout_fail.yaml @@ -7,7 +7,7 @@ metadata: spec: schedule: "@every 5m" http: - - endpoint: https://httpbin.demo.aws.flanksource.com/delay/2 + - url: https://httpbin.demo.aws.flanksource.com/delay/2 name: http fail timeout thresholdMillis: 100 responseCodes: [200] diff --git a/fixtures/minimal/icmp_fail.yaml b/fixtures/minimal/icmp_fail.yaml index 541dd9b85..1a9affe1f 100644 --- a/fixtures/minimal/icmp_fail.yaml +++ b/fixtures/minimal/icmp_fail.yaml @@ -5,7 +5,7 @@ metadata: spec: schedule: "@every 5m" icmp: - - endpoint: https://github.com + - url: https://github.com thresholdMillis: 1 packetLossThreshold: 5 packetCount: 2 diff --git a/fixtures/minimal/jmeter.yaml b/fixtures/minimal/jmeter.yaml index 24b5dcac8..5eb081c62 100644 --- a/fixtures/minimal/jmeter.yaml +++ b/fixtures/minimal/jmeter.yaml @@ -3,7 +3,7 @@ kind: Canary metadata: name: jmeter-check spec: - interval: 30 + schedule: '@every 30s' jmeter: - name: jmeter check url: 192.168.1.5 diff --git a/fixtures/minimal/tcp.yaml b/fixtures/minimal/tcp.yaml index 6bcdd426e..7fba76329 100644 --- a/fixtures/minimal/tcp.yaml +++ b/fixtures/minimal/tcp.yaml @@ -6,5 +6,5 @@ spec: schedule: "*/1 * * * *" tcp: - name: "flanksource website" - endpoint: www.flanksource.com:80 + url: www.flanksource.com:80 thresholdMillis: 1200 diff --git a/fixtures/quarantine/icmp_pass.yaml b/fixtures/quarantine/icmp_pass.yaml index 1ff7da262..39b1da664 100644 --- a/fixtures/quarantine/icmp_pass.yaml +++ b/fixtures/quarantine/icmp_pass.yaml @@ -5,7 +5,8 @@ metadata: spec: schedule: "@every 5m" icmp: - - endpoint: https://api.github.com + - name: ICMP test + url: https://api.github.com thresholdMillis: 600 packetLossThreshold: 10 packetCount: 2 diff --git a/fixtures/quarantine/s3_fail.yaml b/fixtures/quarantine/s3_fail.yaml index f1707f1e4..d5680c6d0 100644 --- a/fixtures/quarantine/s3_fail.yaml +++ b/fixtures/quarantine/s3_fail.yaml @@ -5,11 +5,13 @@ metadata: spec: schedule: "@every 5m" s3: - - bucket: - name: "test-bucket" - region: "us-east-1" - endpoint: "https://test-bucket.s3.us-east-1.amazonaws.com" - secretKey: "****************" - accessKey: "~~~~~~~~~~~~~~~~" + - name: s3 check + bucket: "test-bucket" + region: "us-east-1" + endpoint: "https://test-bucket.s3.us-east-1.amazonaws.com" + secretKey: + value: "****************" + accessKey: + value: "~~~~~~~~~~~~~~~~" objectPath: "path/to/object" skipTLSVerify: true diff --git a/fixtures/topology/component-with-for-each.yml b/fixtures/topology/component-with-for-each.yml index 2ea3d6217..e6ec5e9e1 100644 --- a/fixtures/topology/component-with-for-each.yml +++ b/fixtures/topology/component-with-for-each.yml @@ -10,7 +10,7 @@ spec: icon: server lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: http-lookup display: expr: | @@ -43,7 +43,7 @@ spec: - name: processor lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: processor_lookup display: expr: | @@ -65,7 +65,7 @@ spec: - name: generic lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: generic_lookup display: expr: | diff --git a/fixtures/topology/component-with-properties.yml b/fixtures/topology/component-with-properties.yml index dbb5e99c8..b9988bc55 100644 --- a/fixtures/topology/component-with-properties.yml +++ b/fixtures/topology/component-with-properties.yml @@ -10,7 +10,7 @@ spec: icon: server lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: http-lookup display: expr: | @@ -36,7 +36,7 @@ spec: - name: error_percentage lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: error_percentage_lookup display: expr: | @@ -58,7 +58,7 @@ spec: - name: owner lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: owner_lookup display: expr: | @@ -80,7 +80,7 @@ spec: - name: generic lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: generic_lookup display: expr: | @@ -92,7 +92,7 @@ spec: - name: key lookup: http: - - endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + - url: https://httpbin.demo.aws.flanksource.com/status/200 name: value_lookup display: expr: '"value"'