Skip to content

Commit 6479a7f

Browse files
feat(chart): tpl-evaluate extraContainers/extraVolumes/extraVolumeMounts/extraEnvVars/podAnnotations on webapp/supervisor/electric
Wraps the five list-typed value slots on each of the three core components in `tpl (toYaml .) $` so operators can embed Go-template directives (e.g. `{{ .Release.Name }}`, `{{ include "trigger-v4.fullname" . }}`, `{{ .Values.webapp.image.repository }}`) inside their override values. Without this, parent-chart umbrellas that inject a sidecar via `extraContainers` are forced to hardcode the image string, ConfigMap names, and any release-name-derived fields as literals — sources of truth drift the moment another value changes. Backwards-compatible: tpl over an already-resolved string with no `{{ }}` directives is a no-op. Default render is unchanged. Chart 4.5.0-rc.2-plt663.1 -> 4.5.0-rc.2-plt663.2. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 81b2d51 commit 6479a7f

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

hosting/k8s/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: trigger
33
description: The official Trigger.dev Helm chart
44
type: application
5-
version: 4.5.0-rc.2-plt663.1
5+
version: 4.5.0-rc.2-plt663.2
66
appVersion: v4.5.0-rc.2
77
home: https://trigger.dev
88
sources:

hosting/k8s/helm/templates/electric.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
metadata:
1616
{{- with .Values.electric.podAnnotations }}
1717
annotations:
18-
{{- toYaml . | nindent 8 }}
18+
{{- tpl (toYaml .) $ | nindent 8 }}
1919
{{- end }}
2020
labels:
2121
{{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }}
@@ -52,7 +52,7 @@ spec:
5252
- name: ELECTRIC_USAGE_REPORTING
5353
value: {{ .Values.electric.config.usageReporting | quote }}
5454
{{- with .Values.electric.extraEnvVars }}
55-
{{- toYaml . | nindent 12 }}
55+
{{- tpl (toYaml .) $ | nindent 12 }}
5656
{{- end }}
5757
{{- if .Values.electric.livenessProbe.enabled }}
5858
livenessProbe:
@@ -91,11 +91,11 @@ spec:
9191
{{- toYaml .Values.electric.resources | nindent 12 }}
9292
{{- with .Values.electric.extraVolumeMounts }}
9393
volumeMounts:
94-
{{- toYaml . | nindent 12 }}
94+
{{- tpl (toYaml .) $ | nindent 12 }}
9595
{{- end }}
9696
{{- with .Values.electric.extraVolumes }}
9797
volumes:
98-
{{- toYaml . | nindent 8 }}
98+
{{- tpl (toYaml .) $ | nindent 8 }}
9999
{{- end }}
100100
---
101101
apiVersion: v1

hosting/k8s/helm/templates/supervisor.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ spec:
6767
{{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }}
6868
{{- with .Values.supervisor.podAnnotations }}
6969
annotations:
70-
{{- toYaml . | nindent 8 }}
70+
{{- tpl (toYaml .) $ | nindent 8 }}
7171
{{- end }}
7272
spec:
7373
serviceAccountName: {{ include "trigger-v4.supervisorServiceAccountName" . }}
@@ -255,7 +255,7 @@ spec:
255255
- name: OTEL_EXPORTER_OTLP_ENDPOINT
256256
value: "http://{{ include "trigger-v4.fullname" . }}-webapp.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.webapp.service.port }}/otel"
257257
{{- with .Values.supervisor.extraEnvVars }}
258-
{{- toYaml . | nindent 12 }}
258+
{{- tpl (toYaml .) $ | nindent 12 }}
259259
{{- end }}
260260
{{- if or (not .Values.webapp.bootstrap.enabled) .Values.supervisor.extraVolumeMounts }}
261261
volumeMounts:
@@ -264,7 +264,7 @@ spec:
264264
mountPath: /home/node/shared
265265
{{- end }}
266266
{{- with .Values.supervisor.extraVolumeMounts }}
267-
{{- toYaml . | nindent 12 }}
267+
{{- tpl (toYaml .) $ | nindent 12 }}
268268
{{- end }}
269269
{{- end }}
270270
{{- with .Values.supervisor.securityContext }}
@@ -283,7 +283,7 @@ spec:
283283
{{- end }}
284284
{{- end }}
285285
{{- with .Values.supervisor.extraVolumes }}
286-
{{- toYaml . | nindent 8 }}
286+
{{- tpl (toYaml .) $ | nindent 8 }}
287287
{{- end }}
288288
{{- end }}
289289
{{- with .Values.supervisor.nodeSelector }}

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:
5757
annotations:
5858
kubectl.kubernetes.io/default-container: webapp
5959
{{- with .Values.webapp.podAnnotations }}
60-
{{- toYaml . | nindent 8 }}
60+
{{- tpl (toYaml .) $ | nindent 8 }}
6161
{{- end }}
6262
labels:
6363
{{- include "trigger-v4.componentSelectorLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 8 }}
@@ -436,16 +436,16 @@ spec:
436436
value: "1"
437437
{{- end }}
438438
{{- with .Values.webapp.extraEnvVars }}
439-
{{- toYaml . | nindent 12 }}
439+
{{- tpl (toYaml .) $ | nindent 12 }}
440440
{{- end }}
441441
volumeMounts:
442442
- name: shared
443443
mountPath: /home/node/shared
444444
{{- with .Values.webapp.extraVolumeMounts }}
445-
{{- toYaml . | nindent 12 }}
445+
{{- tpl (toYaml .) $ | nindent 12 }}
446446
{{- end }}
447447
{{- with .Values.webapp.extraContainers }}
448-
{{- toYaml . | nindent 8 }}
448+
{{- tpl (toYaml .) $ | nindent 8 }}
449449
{{- end }}
450450
volumes:
451451
- name: shared
@@ -456,7 +456,7 @@ spec:
456456
emptyDir: {}
457457
{{- end }}
458458
{{- with .Values.webapp.extraVolumes }}
459-
{{- toYaml . | nindent 8 }}
459+
{{- tpl (toYaml .) $ | nindent 8 }}
460460
{{- end }}
461461
{{- with .Values.webapp.nodeSelector }}
462462
nodeSelector:

0 commit comments

Comments
 (0)