Extract prometheus.yaml into assets

It's a lot easier to show and explain the Prometheus config if available
in the standard yaml format. The Kubernetes ConfigMap specs can always
be auto-generated.
This commit is contained in:
Tobias Schmidt
2016-11-02 15:45:16 -04:00
parent d3ba116f71
commit 0613e00dcc
6 changed files with 81 additions and 9 deletions

View File

@@ -1,7 +1,10 @@
#!/bin/bash
# Generate Prometheus configuration ConfigMap
kubectl create configmap --dry-run=true prometheus-k8s --from-file=assets/prometheus/prometheus.yaml -oyaml > manifests/prometheus/prometheus-k8s-cm.yaml
# Generate Alert Rules ConfigMap
kubectl create configmap --dry-run=true prometheus-k8s-rules --from-file=assets/alerts/ -oyaml > manifests/prometheus/prometheus-k8s-rules.yaml
kubectl create configmap --dry-run=true prometheus-k8s-rules --from-file=assets/prometheus/rules/ -oyaml > manifests/prometheus/prometheus-k8s-rules.yaml
# Generate Dashboard ConfigMap
kubectl create configmap --dry-run=true grafana-dashboards --from-file=assets/grafana/ -oyaml > manifests/grafana/grafana-cm.yaml