Skip to content

Commit

Permalink
fix(helm): syntax fix in dashboard template (#1417)
Browse files Browse the repository at this point in the history
**Description of the change**

Addresses #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**

<!-- Enter any applicable Issues here (You can reference an issue using
#) -->
- 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 <[email protected]>
  • Loading branch information
pippitt committed Dec 23, 2023
1 parent b625b3b commit c418d12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helm/sealed-secrets/templates/configmap-dashboards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit c418d12

Please sign in to comment.