diff --git a/fixtures/minimal/http_auth_from_config_map.yaml b/fixtures/minimal/http_auth_from_config_map.yaml new file mode 100644 index 000000000..f85bcca21 --- /dev/null +++ b/fixtures/minimal/http_auth_from_config_map.yaml @@ -0,0 +1,23 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-basic-auth +spec: + schedule: "@every 1m" + http: + - name: "basic auth fail" + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + responseCodes: [401] + - name: "basic auth pass" + url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world + responseCodes: [200] + username: + valueFrom: + configMapKeyRef: + name: basic-auth + key: username + password: + valueFrom: + configMapKeyRef: + name: basic-auth + key: password diff --git a/fixtures/minimal/http_auth_from_helm_ref.yaml b/fixtures/minimal/http_auth_from_helm_ref.yaml new file mode 100644 index 000000000..f95973e0c --- /dev/null +++ b/fixtures/minimal/http_auth_from_helm_ref.yaml @@ -0,0 +1,15 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-from-helm +spec: + schedule: "@every 1m" + http: + - name: HTTP check + url: $(url) + env: + - name: url + valueFrom: + helmRef: + name: podinfo + key: .ingress.hosts[0].host diff --git a/fixtures/minimal/http_auth.yaml b/fixtures/minimal/http_auth_from_secret.yaml similarity index 96% rename from fixtures/minimal/http_auth.yaml rename to fixtures/minimal/http_auth_from_secret.yaml index 4c302c71a..53fa3cdc9 100644 --- a/fixtures/minimal/http_auth.yaml +++ b/fixtures/minimal/http_auth_from_secret.yaml @@ -3,6 +3,7 @@ kind: Canary metadata: name: http-basic-auth spec: + schedule: "@every 1m" http: - name: "basic auth fail" url: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world diff --git a/fixtures/minimal/http_auth_from_service_account.yaml b/fixtures/minimal/http_auth_from_service_account.yaml new file mode 100644 index 000000000..2c300e475 --- /dev/null +++ b/fixtures/minimal/http_auth_from_service_account.yaml @@ -0,0 +1,20 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-basic-auth-service-account +spec: + schedule: "@every 1m" + http: + - name: vault-example-sre + description: "HashiCorp Vault functionality check." + url: https://vault.example/v1/auth/kubernetes/login + env: + - name: TOKEN + valueFrom: + serviceAccount: default-account + templateBody: true + body: | + { + "jwt": "$(TOKEN)", + "role": "example-role" + } diff --git a/fixtures/minimal/http_simple.yaml b/fixtures/minimal/http_simple.yaml new file mode 100644 index 000000000..6b683ac00 --- /dev/null +++ b/fixtures/minimal/http_simple.yaml @@ -0,0 +1,11 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-check +spec: + schedule: "@every 30s" + http: + - name: basic-check + url: https://httpbin.demo.aws.flanksource.com/status/200 + - name: failing-check + url: https://httpbin.demo.aws.flanksource.com/status/500 diff --git a/fixtures/minimal/http_tls_check_pass.yaml b/fixtures/minimal/http_tls_check_pass.yaml new file mode 100644 index 000000000..c2428bbe3 --- /dev/null +++ b/fixtures/minimal/http_tls_check_pass.yaml @@ -0,0 +1,11 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-tls-duration +spec: + schedule: "@every 5m" + http: + - name: http pass response 200 status code + endpoint: https://httpbin.demo.aws.flanksource.com/status/200 + test: + expr: "code in [200,201,301] && sslAge > Duration('7d')" diff --git a/fixtures/minimal/http_tls_config.yaml b/fixtures/minimal/http_tls_config.yaml new file mode 100644 index 000000000..df41ac2ea --- /dev/null +++ b/fixtures/minimal/http_tls_config.yaml @@ -0,0 +1,15 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-check +spec: + schedule: "@every 30s" + http: + - name: http pass response 200 status code + url: https://httpbin.demo.aws.flanksource.com/status/200 + tlsConfig: + ca: + valueFrom: + secretKeyRef: + name: ca-cert + key: ca.pem diff --git a/fixtures/minimal/http_trace_pass.yaml b/fixtures/minimal/http_trace_pass.yaml new file mode 100644 index 000000000..67c7d13c8 --- /dev/null +++ b/fixtures/minimal/http_trace_pass.yaml @@ -0,0 +1,11 @@ +apiVersion: canaries.flanksource.com/v1 +kind: Canary +metadata: + name: http-check + annotations: + trace: "true" +spec: + schedule: "@every 30s" + http: + - name: headers check + url: https://httpbin.demo.aws.flanksource.com/headers