Skip to content

Commit 1ee74b7

Browse files
fix(chart): render webapp/electric extras when provided as a templated string
Guard the new extraInitContainers/extraContainers (webapp) and extraVolumes/extraVolumeMounts (electric) consumers with a kindIs "string" check. When the value is a structured list it still renders via tpl (toYaml .) $ as before; when it is a YAML block-scalar string (as the GovSignals umbrella chart feeds it, with embedded {{ include }} helpers) it is rendered via tpl . $ directly, avoiding the stray "|" block indicator that toYaml emits for strings and breaks list parsing. Backward-compatible: list values render identically. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 76180da commit 1ee74b7

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

hosting/k8s/helm/templates/electric.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,19 @@ spec:
9191
{{- toYaml .Values.electric.resources | nindent 12 }}
9292
{{- with .Values.electric.extraVolumeMounts }}
9393
volumeMounts:
94+
{{- if kindIs "string" . }}
95+
{{- tpl . $ | nindent 12 }}
96+
{{- else }}
9497
{{- tpl (toYaml .) $ | nindent 12 }}
98+
{{- end }}
9599
{{- end }}
96100
{{- with .Values.electric.extraVolumes }}
97101
volumes:
102+
{{- if kindIs "string" . }}
103+
{{- tpl . $ | nindent 8 }}
104+
{{- else }}
98105
{{- tpl (toYaml .) $ | nindent 8 }}
106+
{{- end }}
99107
{{- end }}
100108
---
101109
apiVersion: v1

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ spec:
8888
- name: shared
8989
mountPath: /home/node/shared
9090
{{- with .Values.webapp.extraInitContainers }}
91+
{{- if kindIs "string" . }}
92+
{{- tpl . $ | nindent 8 }}
93+
{{- else }}
9194
{{- tpl (toYaml .) $ | nindent 8 }}
9295
{{- end }}
96+
{{- end }}
9397
containers:
9498
- name: token-syncer
9599
image: {{ include "trigger-v4.webapp.tokenSyncer.image" . }}
@@ -428,8 +432,12 @@ spec:
428432
{{- toYaml . | nindent 12 }}
429433
{{- end }}
430434
{{- with .Values.webapp.extraContainers }}
435+
{{- if kindIs "string" . }}
436+
{{- tpl . $ | nindent 8 }}
437+
{{- else }}
431438
{{- tpl (toYaml .) $ | nindent 8 }}
432439
{{- end }}
440+
{{- end }}
433441
volumes:
434442
- name: shared
435443
{{- if .Values.persistence.shared.enabled }}

0 commit comments

Comments
 (0)