From bf81d3a4133edc53b7e4c500a14ad415408a1cc5 Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Fri, 8 Sep 2023 17:21:53 +0100 Subject: [PATCH] Apply templating to remote_read & remote_write config Signed-off-by: Garry O'Donnell --- charts/prometheus/Chart.yaml | 2 +- charts/prometheus/templates/cm.yaml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/prometheus/Chart.yaml b/charts/prometheus/Chart.yaml index d65d78c7f6ae..7c5e61eccfb5 100644 --- a/charts/prometheus/Chart.yaml +++ b/charts/prometheus/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: prometheus appVersion: v2.47.0 -version: 24.4.0 +version: 25.0.0 kubeVersion: ">=1.19.0-0" description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/charts/prometheus/templates/cm.yaml b/charts/prometheus/templates/cm.yaml index a702b527ee32..90cb948357dc 100644 --- a/charts/prometheus/templates/cm.yaml +++ b/charts/prometheus/templates/cm.yaml @@ -22,11 +22,15 @@ data: {{ $root.Values.server.global | toYaml | trimSuffix "\n" | indent 6 }} {{- if $root.Values.server.remoteWrite }} remote_write: -{{ $root.Values.server.remoteWrite | toYaml | indent 4 }} +{{- range $root.Values.server.remoteWrite }} +{{- tpl . $root | toYaml | cat "-" | nindent 4 }} +{{- end }} {{- end }} {{- if $root.Values.server.remoteRead }} remote_read: -{{ $root.Values.server.remoteRead | toYaml | indent 4 }} +{{- range $root.Values.server.remoteRead }} +{{- tpl . $root | toYaml | cat "-" | nindent 4 }} +{{- end }} {{- end }} {{- if or $root.Values.server.tsdb $root.Values.server.exemplars }} storage: