-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e0ff56
commit 6dfba14
Showing
8 changed files
with
78 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Availability Zone checks | ||
command: | ||
{{ if .Vars.enable_az_tests }} | ||
app-az-distribution: | ||
exec: juju status --format=json -m {{ .Vars.model_name }} | ||
exit-status: 0 | ||
stdout: | ||
gjson: | ||
applications.{{ .Vars.apps.machine.prometheus_openstack_exporter.name }}.units.@values.#.machine: | ||
consist-of: | ||
- "0" | ||
- "1" | ||
- "2" | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
# Kubernetes-type checks | ||
command: | ||
{{ if .Vars.enable_k8s_tests }} | ||
loki-pod-status-healthy: | ||
exec: kubectl get pod {{ .Vars.apps.loki.name }}-0 -n {{ .Vars.model_name }} -o json | jq -r '[.status.conditions[] | .status == "True"] | all' | ||
pod-status-healthy: | ||
exec: kubectl get pods -n {{ .Vars.model_name }} --output=json | ||
exit-status: 0 | ||
stdout: | ||
have-patterns: | ||
- 'true' | ||
gjson: | ||
items.#.status.conditions.#.status|@flatten: | ||
not: | ||
- "False" | ||
stderr: "" | ||
loki-pod-container-healthy: | ||
exec: kubectl get pod {{ .Vars.apps.loki.name }}-0 -n {{ .Vars.model_name }} -o json | jq -r '[.status.containerStatuses[] | .ready == true] | all' | ||
|
||
pod-container-healthy: | ||
exec: kubectl get pods -n {{ .Vars.model_name }} --output=json | ||
exit-status: 0 | ||
stdout: | ||
have-patterns: | ||
- 'true' | ||
gjson: | ||
items.#.status.containerStatuses.#.ready: | ||
not: | ||
- "false" | ||
stderr: "" | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Deployment relation checks | ||
command: | ||
{{ if .Vars.enable_model_tests }} | ||
validate-model-configuration: | ||
exec: juju status --format=json -m {{ .Vars.model_name }} | ||
exit-status: 0 | ||
stdout: | ||
gjson: | ||
applications: | ||
and: | ||
- {have-key: {{ .Vars.apps.k8s.alertmanager.name }}} | ||
- {have-key: {{ .Vars.apps.k8s.catalogue.name }}} | ||
- {have-key: {{ .Vars.apps.k8s.grafana.name }}} | ||
- {have-key: {{ .Vars.apps.k8s.loki.name }}} | ||
- {have-key: {{ .Vars.apps.k8s.prometheus.name }}} | ||
- {have-key: {{ .Vars.apps.k8s.traefik.name }}} | ||
applications.{{ .Vars.apps.k8s.prometheus.name }}.relations: | ||
and: | ||
- {have-key: {{ .Vars.apps.k8s.alertmanager.name }}} | ||
stderr: "" | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
model_name: cos-model | ||
|
||
apps: | ||
alertmanager: | ||
name: alertmanager | ||
catalogue: | ||
name: catalogue | ||
grafana: | ||
name: grafana | ||
loki: | ||
name: loki | ||
prometheus: | ||
name: prometheus | ||
traefik: | ||
name: traefik | ||
k8s: | ||
alertmanager: | ||
name: alertmanager | ||
catalogue: | ||
name: catalogue | ||
grafana: | ||
name: grafana | ||
loki: | ||
name: loki | ||
prometheus: | ||
name: prometheus | ||
traefik: | ||
name: traefik | ||
machine: | ||
# TODO: File an issue that keys cannot have '-' in the name, replace with _. | ||
# E.g. app.machine.prometheus_openstack_exporter is valid but app.machine.prometheus-openstack-exporter is not | ||
prometheus_openstack_exporter: | ||
name: prometheus-openstack-exporter | ||
|
||
enable_self_tests: true | ||
enable_relation_tests: true | ||
enable_post_relation_tests: true | ||
enable_network_tests: true | ||
enable_az_tests: true | ||
enable_k8s_tests: true | ||
enable_model_tests: true | ||
enable_network_tests: true | ||
enable_pebble_tests: true | ||
enable_post_relation_tests: true |