Skip to content

Commit

Permalink
chore: replace endpoint with url
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Oct 1, 2024
1 parent a4ae533 commit f48b74a
Show file tree
Hide file tree
Showing 28 changed files with 120 additions and 37 deletions.
3 changes: 2 additions & 1 deletion fixtures/aws/s3_bucket_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fixtures/datasources/GCP/database_backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ spec:
databaseBackup:
- name: backup
maxAge: 6h
GCP:
gcp:
project: google-project-name
instance: cloudsql-instance-name
18 changes: 18 additions & 0 deletions fixtures/datasources/GCP/database_backup_cred.yaml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions fixtures/datasources/GCP/database_backup_cred_from_connection.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions fixtures/datasources/folder_single_pass.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions fixtures/datasources/folder_with_filter.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion fixtures/datasources/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/external/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Canary
metadata:
name: node-catalogs
spec:
interval: 30
schedule: '@every 30s'
catalog:
- name: ingress-catalog-check
selector:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/external/crossplane-kubernetes-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions fixtures/k8s/helm_check.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion fixtures/k8s/http_auth_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion fixtures/k8s/http_auth_secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/containerd-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/containerd-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fixtures/minimal/http_auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions fixtures/minimal/http_auth_static_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fixtures/minimal/http_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/http_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/http_single_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion fixtures/minimal/http_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/http_timeout_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
2 changes: 1 addition & 1 deletion fixtures/minimal/icmp_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
schedule: "@every 5m"
icmp:
- endpoint: https://github.com
- url: https://github.com
thresholdMillis: 1
packetLossThreshold: 5
packetCount: 2
2 changes: 1 addition & 1 deletion fixtures/minimal/jmeter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fixtures/minimal/tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ spec:
schedule: "*/1 * * * *"
tcp:
- name: "flanksource website"
endpoint: www.flanksource.com:80
url: www.flanksource.com:80
thresholdMillis: 1200
3 changes: 2 additions & 1 deletion fixtures/quarantine/icmp_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 8 additions & 6 deletions fixtures/quarantine/s3_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions fixtures/topology/component-with-for-each.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
10 changes: 5 additions & 5 deletions fixtures/topology/component-with-properties.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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"'
Expand Down

0 comments on commit f48b74a

Please sign in to comment.