KubeZero/charts/kubezero-metrics/update.sh

25 lines
996 B
Bash
Raw Normal View History

#!/bin/bash
2021-12-15 22:19:52 +00:00
set -ex
2022-12-06 20:43:11 +00:00
helm dep update
2022-10-27 12:27:42 +00:00
VERSION=$(yq eval '.dependencies[] | select(.name=="kube-prometheus-stack") | .version' Chart.yaml)
rm -rf charts/kube-prometheus-stack
helm pull prometheus-community/kube-prometheus-stack --untar --untardir charts --version $VERSION
2021-12-09 18:03:55 +00:00
# workaround for https://github.com/prometheus-community/helm-charts/issues/1500
2021-07-01 11:36:35 +00:00
patch -p0 -i zdt.patch --no-backup-if-mismatch
# Create ZDT dashboard, alerts etc configmaps
cd jsonnet && make
../sync_grafana_dashboards.py metrics-dashboards.yaml ../templates/grafana-dashboards-metrics.yaml
../sync_grafana_dashboards.py k8s-dashboards.yaml ../templates/grafana-dashboards-k8s.yaml
../sync_grafana_dashboards.py zdt-dashboards.yaml ../templates/grafana-dashboards-zdt.yaml
../sync_prometheus_rules.py k8s-rules.yaml ../templates/rules
cd -
# Delete not used upstream dashboards or rules
rm -rf charts/kube-prometheus-stack/templates/grafana/dashboards-1.14 charts/kube-prometheus-stack/templates/prometheus/rules-1.14