From c418d12cb338134ab32df12d6fea0d9676fe554c Mon Sep 17 00:00:00 2001 From: pippitt Date: Sat, 23 Dec 2023 05:25:44 -0700 Subject: [PATCH] fix(helm): syntax fix in dashboard template (#1417) **Description of the change** Addresses https://github.com/bitnami-labs/sealed-secrets/issues/1416 Update dashboard configmap template syntax on commonLabels **Benefits** When dashboards are enabled helm will now render them correctly. **Possible drawbacks** None know. **Applicable issues** - fixes #1416 **Additional information** Tested with helm template. Before fix with dashboards enabled: ``` helm template testing . --values values.yaml Error: template: sealed-secrets/templates/configmap-dashboards.yaml:14:18: executing "sealed-secrets/templates/configmap-dashboards.yaml" at <.Values.commonLabels>: can't evaluate field Values in type []uint8 Use --debug flag to render out invalid YAML ``` With change, renders as expected. Signed-off-by: Matt Pippitt --- helm/sealed-secrets/templates/configmap-dashboards.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/sealed-secrets/templates/configmap-dashboards.yaml b/helm/sealed-secrets/templates/configmap-dashboards.yaml index 648f4b05c..9cbd2687b 100644 --- a/helm/sealed-secrets/templates/configmap-dashboards.yaml +++ b/helm/sealed-secrets/templates/configmap-dashboards.yaml @@ -11,8 +11,8 @@ metadata: {{- if $.Values.metrics.dashboards.labels }} {{- include "sealed-secrets.render" ( dict "value" $.Values.metrics.dashboards.labels "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonLabels }} - {{- include "sealed-secrets.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- if $.Values.commonLabels }} + {{- include "sealed-secrets.render" (dict "value" $.Values.commonLabels "context" $) | nindent 4 }} {{- end }} annotations: {{- if $.Values.metrics.dashboards.annotations }}