Skip to content

Commit

Permalink
chore: update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Sep 19, 2024
1 parent 41b3ce8 commit 1b35f61
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
13 changes: 13 additions & 0 deletions fixtures/k8s/http_auth_sa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: http-basic-auth-token
namespace: canaries
spec:
http:
- url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world
responseCodes: [200]
headers:
- name: Authorization
valueFrom:
serviceAccount: default
2 changes: 0 additions & 2 deletions fixtures/k8s/http_auth_secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ kind: Canary
metadata:
name: http-basic-auth-secret
namespace: canaries
annotation:
debug: "true"
spec:
http:
- endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world
Expand Down
18 changes: 18 additions & 0 deletions fixtures/minimal/http-templateBody.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: http-check-template
spec:
interval: 30
http:
- name: template body
url: https://httpbin.demo.aws.flanksource.com/post
method: POST
templateBody: true
body: |
{
"name": "{{.metadata.name}}"
}
display:
expr: json['json']
# template: "Received from: {{.json.origin}}: {{.json.json.name}} in {{.sslAge | div 10000000}}"
18 changes: 18 additions & 0 deletions fixtures/prometheus/jobs-fail-only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: prometheus-failing-jobs
spec:
interval: 30
prometheus:
- name: Jobs
query: up{namespace!~"kube-system|monitoring"} == 0
url: http://prometheus.monitoring.svc:9090
transform:
expr: |
dyn(results).map(r, {
'name': r.job,
'namespace': 'namespace' in r ? r.namespace : '',
'labels': r.omit(["value", "__name__"]),
'pass': false
}).toJSON()
18 changes: 18 additions & 0 deletions fixtures/prometheus/jobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: prometheus-jobs
spec:
interval: 30
prometheus:
- name: Jobs
query: up{namespace!~"kube-system|monitoring"}
url: http://prometheus.monitoring.svc:9090
transform:
expr: |
dyn(results).map(r, {
'name': r.job,
'namespace': 'namespace' in r ? r.namespace : '',
'labels': r.omit(["value", "__name__"]),
'pass': r["value"] > 0
}).toJSON()

0 comments on commit 1b35f61

Please sign in to comment.