COS configuration
- Canonical Observability
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 58 | 19 Nov 2024 | |
latest/candidate | 63 | 03 Dec 2024 | |
latest/beta | 66 | 03 Dec 2024 | |
latest/edge | 67 | 13 Dec 2024 | |
1.0/stable | 42 | 16 Feb 2024 | |
1.0/candidate | 42 | 12 Dec 2023 | |
1.0/beta | 42 | 12 Dec 2023 | |
1.0/edge | 42 | 12 Dec 2023 |
juju deploy cos-configuration-k8s
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Deployment
juju deploy cos-configuration-k8s \
--config git_repo=https://path.to/repo \
--config git_branch=main \
--config git_depth=1 \
--config prometheus_alert_rules_path=rules/prod/prometheus/
juju relate cos-configuration-k8s prometheus-k8s
Paths to rules files etc. can also be set after deployment:
juju config cos-configuration-k8s loki_alert_rules_path=rules/prod/loki/
juju relate cos-configuration-k8s loki-k8s
juju config cos-configuration-k8s grafana_dashboards_path=dashboards/prod/grafana/
juju relate cos-configuration-k8s grafana-k8s
Verification
After setting the git_repo
(and optionally git_branch
), the contents should be present in the workload container,
$ juju ssh --container git-sync cos-configuration-k8s/0 ls -l /git
total 4
drwxr-xr-x 6 root root 4096 Oct 24 08:59 7f0b1eac9317850aee320b4f47a7f1527aaff625
lrwxrwxrwx 1 root root 40 Oct 24 08:59 repo -> 7f0b1eac9317850aee320b4f47a7f1527aaff625
and accessible from the charm container
$ juju ssh cos-configuration-k8s/0 ls -l /var/lib/juju/storage/content-from-git/0
total 4
drwxr-xr-x 6 root root 4096 Oct 24 08:59 7f0b1eac9317850aee320b4f47a7f1527aaff625
lrwxrwxrwx 1 root root 40 Oct 24 08:59 repo -> 7f0b1eac9317850aee320b4f47a7f1527aaff625
After relating to e.g. prometheus, rules from the synced repo should appear in app data,
juju show-unit prometheus-k8s/0 --format json | jq '."prometheus-k8s/0"."relation-info"'
as well as in prometheus itself
juju ssh prometheus-k8s/0 curl localhost:9090/api/v1/rules