Skip to content

Commit 8ad2a39

Browse files
ClemaXjessebot
andauthored
fix(helpers): correct templating for labels (#694)
* fix(helpers): correct templating for labels Signed-off-by: Clément Hamada <[email protected]> * Update charts/matrix/Chart.yaml - fix version --------- Signed-off-by: Clément Hamada <[email protected]> Co-authored-by: Jesse Hitch <[email protected]>
1 parent a2ec6f6 commit 8ad2a39

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

charts/matrix/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sources:
88

99
type: application
1010

11-
version: 19.5.0
11+
version: 19.5.1
1212

1313
# renovate: image=ghcr.io/element-hq/synapse
1414
appVersion: v1.128.0

charts/matrix/templates/_helpers.tpl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,12 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
4242
app.kubernetes.io/name: "matrix"
4343
{{- end -}}
4444

45-
# TODO: Include labels from values
4645
{{/*
4746
Synapse specific labels
4847
*/}}
4948
{{- define "matrix.synapse.labels" -}}
50-
{{- range $key, $val := .Values.synapse.labels -}}
51-
{{ $key }}: {{ $val }}
49+
{{- with .Values.synapse.labels }}
50+
{{- toYaml . }}
5251
{{- end }}
5352
{{- end -}}
5453

@@ -67,17 +66,17 @@ Create image name that is used in the deployment
6766
Element specific labels
6867
*/}}
6968
{{- define "matrix.element.labels" -}}
70-
{{- range $key, $val := .Values.element.labels }}
71-
{{ $key }}: {{ $val }}
69+
{{- with .Values.element.labels }}
70+
{{- toYaml . }}
7271
{{- end }}
7372
{{- end -}}
7473

7574
{{/*
7675
Mail relay specific labels
7776
*/}}
7877
{{- define "matrix.mail.labels" -}}
79-
{{- range $key, $val := .Values.mail.relay.labels -}}
80-
{{ $key }}: {{ $val }}
78+
{{- with .Values.mail.relay.labels }}
79+
{{- toYaml . }}
8180
{{- end }}
8281
{{- end -}}
8382

0 commit comments

Comments
 (0)