From fa62a54fba5003af0bb4c55d397d76669bc2bded Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Sat, 19 Aug 2023 10:01:35 +0200 Subject: [PATCH] fix(prometheus): Fix remoteWrite rendering (#11659) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Replace old common render with `toYaml` syntax. ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [x] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: SuperQ Signed-off-by: Ben Kochie Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- charts/enterprise/prometheus/Chart.yaml | 2 +- .../prometheus/templates/prometheus/_prometheus.tpl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/enterprise/prometheus/Chart.yaml b/charts/enterprise/prometheus/Chart.yaml index 8e129252d9d..3e8982566d3 100644 --- a/charts/enterprise/prometheus/Chart.yaml +++ b/charts/enterprise/prometheus/Chart.yaml @@ -29,7 +29,7 @@ sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus type: application -version: 12.1.1 +version: 12.1.2 annotations: truecharts.org/catagories: | - metrics diff --git a/charts/enterprise/prometheus/templates/prometheus/_prometheus.tpl b/charts/enterprise/prometheus/templates/prometheus/_prometheus.tpl index 2410c614c4b..e4c20bc6eb1 100644 --- a/charts/enterprise/prometheus/templates/prometheus/_prometheus.tpl +++ b/charts/enterprise/prometheus/templates/prometheus/_prometheus.tpl @@ -126,8 +126,9 @@ spec: {{- if .Values.prometheus.remoteRead }} remoteRead: {{- include "tc.v1.common.tplvalues.render" (dict "value" .Values.prometheus.remoteRead "context" $) | nindent 4 }} {{- end }} - {{- if .Values.prometheus.remoteWrite }} - remoteWrite: {{- include "tc.v1.common.tplvalues.render" (dict "value" .Values.prometheus.remoteWrite "context" $) | nindent 4 }} + {{- with .Values.prometheus.remoteWrite }} + remoteWrite: + {{- tpl (toYaml .) $ | nindent 4 }} {{- end }} {{- if .Values.prometheus.podSecurityContext.enabled }} securityContext: {{- omit .Values.prometheus.podSecurityContext "enabled" | toYaml | nindent 4 }}