Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update fixtures with canaries namespace #1181

Merged
merged 4 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 24 additions & 30 deletions fixtures/datasources/_setup.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
apiVersion: v1
kind: Secret
metadata:
name: aws-credentials
namespace: default
namespace: canaries
stringData:
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
Expand All @@ -13,7 +14,7 @@ metadata:
labels:
app: postgres
name: postgres
namespace: default
namespace: canaries
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -44,7 +45,7 @@ metadata:
labels:
app: mysql
name: mysql
namespace: default
namespace: canaries
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -75,7 +76,7 @@ apiVersion: v1
kind: Service
metadata:
name: mysql
namespace: default
namespace: canaries
spec:
ports:
- name: mysql
Expand All @@ -91,7 +92,7 @@ metadata:
labels:
app: mssql
name: mssql
namespace: default
namespace: canaries
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -119,7 +120,7 @@ apiVersion: v1
kind: Service
metadata:
name: mssql
namespace: default
namespace: canaries
spec:
ports:
- name: mssql
Expand All @@ -134,7 +135,7 @@ apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: default
namespace: canaries
spec:
ports:
- name: psql
Expand All @@ -150,7 +151,7 @@ metadata:
labels:
app: redis
name: redis
namespace: default
namespace: canaries
spec:
replicas: 1
selector:
Expand All @@ -172,7 +173,7 @@ apiVersion: v1
kind: Service
metadata:
name: redis
namespace: default
namespace: canaries
spec:
ports:
- name: redis
Expand All @@ -188,7 +189,7 @@ metadata:
labels:
app: mongo
name: mongo
namespace: default
namespace: canaries
spec:
replicas: 1
selector:
Expand All @@ -215,7 +216,7 @@ apiVersion: v1
kind: Service
metadata:
name: mongo
namespace: default
namespace: canaries
spec:
ports:
- name: mongo
Expand All @@ -225,16 +226,11 @@ spec:
selector:
app: mongo
---
apiVersion: v1
kind: Namespace
metadata:
name: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: podinfo
namespace: default
namespace: canaries
spec:
minReadySeconds: 3
revisionHistoryLimit: 5
Expand Down Expand Up @@ -310,7 +306,7 @@ apiVersion: v1
kind: Service
metadata:
name: podinfo
namespace: default
namespace: canaries
spec:
type: ClusterIP
selector:
Expand All @@ -329,7 +325,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: podinfo-ing
namespace: default
namespace: canaries
annotations:
nginx.ingress.kubernetes.io/client_max_body_size: "64m"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
Expand All @@ -350,13 +346,16 @@ apiVersion: v1
kind: Secret
metadata:
name: podinfo-header
namespace: default
namespace: canaries
type: Opaque
data:
value: Zm9v

---
apiVersion: v1
kind: ConfigMap
metadata:
name: jmeter-pass-test
namespace: canaries
data:
sampleTest.jmx:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<jmeterTestPlan version=\"1.2\"
Expand Down Expand Up @@ -439,13 +438,12 @@ data:
\ <stringProp name=\"TestPlan.comments\">For scripting only</stringProp>\n
\ <stringProp name=\"filename\"></stringProp>\n </ResultCollector>\n
\ <hashTree/>\n </hashTree>\n </hashTree>\n</jmeterTestPlan>\n"
kind: ConfigMap
metadata:
name: jmeter-pass-test
namespace: default

---
apiVersion: v1
kind: ConfigMap
metadata:
name: jmeter-fail-test
namespace: canaries
data:
http.jmx:
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<jmeterTestPlan version=\"1.2\"
Expand Down Expand Up @@ -574,7 +572,3 @@ data:
\ <stringProp name=\"TestPlan.comments\">For scripting only</stringProp>\n
\ <stringProp name=\"filename\"></stringProp>\n </ResultCollector>\n
\ <hashTree/>\n </hashTree>\n </hashTree>\n</jmeterTestPlan>\n"
kind: ConfigMap
metadata:
name: jmeter-fail-test
namespace: default
1 change: 0 additions & 1 deletion fixtures/datasources/alertmanager_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: alertmanager
namespace: default
labels:
"Expected-Fail": "true"
spec:
Expand Down
1 change: 1 addition & 0 deletions fixtures/datasources/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: canaries
resources:
- _setup.yaml
- mongo_fail.yaml
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/mongo_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mongo-fail
namespace: canaries
labels:
"Expected-Fail": "true"
spec:
interval: 30
mongodb:
- url: mongodb://mongo2.default.svc.cluster.local:27017/?authSource=admin
- url: mongodb://mongo2.canaries.svc.cluster.local:27017/?authSource=admin
name: mongo wrong password
description: test mongo instance
username:
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/mongo_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mongo
namespace: canaries
spec:
interval: 30
mongodb:
- url: mongodb://$(username):$(password)@mongo.default.svc.cluster.local:27017/?authSource=admin
- url: mongodb://$(username):$(password)@mongo.canaries.svc.cluster.local:27017/?authSource=admin
name: mongo ping check
username:
value: mongoadmin
Expand Down
1 change: 1 addition & 0 deletions fixtures/datasources/mssql_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mssql-fail
namespace: canaries
labels:
"Expected-Fail": "true"
spec:
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/mssql_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mssql-pass
namespace: canaries
spec:
interval: 30
mssql:
- url: "server=mssql.default.svc.cluster.local;user id=$(username);password=$(password);port=1433;database=master"
- url: "server=mssql.canaries.svc.cluster.local;user id=$(username);password=$(password);port=1433;database=master"
name: mssql pass
username:
value: sa
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/mysql_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mysql-fail
namespace: canaries
labels:
"Expected-Fail": "true"
spec:
interval: 30
mysql:
- url: "$(username):$(password)@tcp(mysql.default.svc.cluster.local:3306)/mysqldb"
- url: "$(username):$(password)@tcp(mysql.canaries.svc.cluster.local:3306)/mysqldb"
name: mysql wrong password
username:
value: mysqladmin
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/mysql_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: mysql-pass
namespace: canaries
spec:
interval: 30
mysql:
- url: "$(username):$(password)@tcp(mysql.default.svc.cluster.local:3306)/mysqldb"
- url: "$(username):$(password)@tcp(mysql.canaries.svc.cluster.local:3306)/mysqldb"
name: mysql ping check
username:
value: mysqladmin
Expand Down
10 changes: 3 additions & 7 deletions fixtures/datasources/postgres_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: postgres-succeed
namespace: canaries
spec:
interval: 30
postgres:
- url: "postgres://$(username):$(password)@postgres.default.svc.cluster.local:5432/postgres?sslmode=disable"
- url: "postgres://$(username):$(password)@postgres.canaries.svc.cluster.local:5432/postgres?sslmode=disable"
name: postgres schemas check
username:
value: postgresadmin
password:
value: admin123
query: SELECT current_schemas(true)
display:
template: |
{{- range $r := .results.rows }}
{{- $r.current_schemas}}
{{- end}}
query: SELECT 1
results: 1
1 change: 1 addition & 0 deletions fixtures/datasources/redis_fail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: redis-fail
namespace: canaries
labels:
"Expected-Fail": "true"
spec:
Expand Down
3 changes: 2 additions & 1 deletion fixtures/datasources/redis_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: redis-succeed
namespace: canaries
spec:
interval: 30
redis:
- addr: "redis.default.svc.cluster.local:6379"
- addr: "redis.canaries.svc.cluster.local:6379"
name: redis ping check
db: 0
description: "The redis pass test"
1 change: 1 addition & 0 deletions fixtures/datasources/s3_bucket_pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: s3-bucket-pass
namespace: canaries
spec:
interval: 30
folder:
Expand Down
11 changes: 5 additions & 6 deletions fixtures/k8s/_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ apiVersion: v1
kind: Secret
metadata:
name: secrets
namespace: default
namespace: canaries
stringData:
DOCKER_USERNAME: test
DOCKER_PASSWORD: password
---
apiVersion: v1
metadata:
name: basic-auth
namespace: default
namespace: canaries
kind: ConfigMap
data:
pass: world
user: hello

---
apiVersion: v1
metadata:
name: basic-auth
namespace: default
namespace: canaries
kind: Secret
stringData:
pass: world
Expand All @@ -30,7 +29,7 @@ apiVersion: v1
kind: Pod
metadata:
name: k8s-check-ready
namespace: default
namespace: canaries
labels:
app: k8s-ready
spec:
Expand All @@ -44,7 +43,7 @@ apiVersion: v1
kind: Pod
metadata:
name: k8s-check-not-ready
namespace: default
namespace: canaries
labels:
app: k8s-not-ready
spec:
Expand Down
1 change: 1 addition & 0 deletions fixtures/k8s/http_auth_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: http-basic-auth-configmap
namespace: canaries
spec:
http:
- endpoint: https://httpbin.demo.aws.flanksource.com/basic-auth/hello/world
Expand Down
1 change: 1 addition & 0 deletions fixtures/k8s/http_auth_secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
name: http-basic-auth-secret
namespace: canaries
annotation:
debug: "true"
spec:
Expand Down
Loading
Loading