From fa28e3b7ea6369891249edd64ddceb6deea18d13 Mon Sep 17 00:00:00 2001 From: Joshua Dotson Date: Wed, 28 Feb 2018 16:25:46 -0500 Subject: [PATCH] [stable/prometheus] Use yaml not literal for alertmanagerFiles (#3777) - Use yaml not literal for alertmanagerFiles (closes #3576). - Raise minor release number to mark the updated values structure. - Fix typo in README associated with yaml not literal for serverFiles. --- stable/prometheus/Chart.yaml | 2 +- stable/prometheus/README.md | 4 ++-- stable/prometheus/templates/alertmanager-configmap.yaml | 8 ++++++-- stable/prometheus/values.yaml | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 1a738b5e95..2e2395af67 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 5.3.3 +version: 5.4.0 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index 6bcc8d948f..d16341f83f 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -77,7 +77,7 @@ Assuming you have an existing release of the prometheus chart, named `prometheus 1. Deploy a new release of the chart with version 5.0+ using prometheus 2.x. In the values.yaml set the scrape config as usual, and also add the `prometheus-old` instance as a remote-read target. ``` - prometheus.yml: | + prometheus.yml: ... remote_read: - url: http://prometheus-old/api/v1/read @@ -126,7 +126,7 @@ Parameter | Description | Default `alertmanager.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` `alertmanager.service.servicePort` | alertmanager service port | `80` `alertmanager.service.type` | type of alertmanager service to create | `ClusterIP` -`alertmanagerFiles` | alertmanager ConfigMap entries | `alertmanager.yml` +`alertmanagerFiles.alertmanager.yml` | Prometheus alertmanager configuration | example configuration `configmapReload.name` | configmap-reload container name | `configmap-reload` `configmapReload.image.repository` | configmap-reload container image repository | `jimmidyson/configmap-reload` `configmapReload.image.tag` | configmap-reload container image tag | `v0.1` diff --git a/stable/prometheus/templates/alertmanager-configmap.yaml b/stable/prometheus/templates/alertmanager-configmap.yaml index c529365dfd..0775a555e4 100644 --- a/stable/prometheus/templates/alertmanager-configmap.yaml +++ b/stable/prometheus/templates/alertmanager-configmap.yaml @@ -10,5 +10,9 @@ metadata: release: {{ .Release.Name }} name: {{ template "prometheus.alertmanager.fullname" . }} data: -{{ toYaml .Values.alertmanagerFiles | indent 2 }} -{{- end }} +{{- $root := . -}} +{{- range $key, $value := .Values.alertmanagerFiles }} + {{ $key }}: | +{{ toYaml $value | default "{}" | indent 4 }} +{{- end -}} +{{- end -}} diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 47a404b009..f7e15b57a0 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -644,7 +644,7 @@ pushgateway: ## alertmanager ConfigMap entries ## alertmanagerFiles: - alertmanager.yml: |- + alertmanager.yml: global: # slack_api_url: ''