Skip to content

Commit 5ac9228

Browse files
feat(helm): add webapp.extraContainers + webapp.extraInitContainers
Mirrors the pattern already established for `webapp.extraEnvVars`, `webapp.extraVolumes`, and `webapp.extraVolumeMounts`. Lets consumers inject sidecars (in-pod TLS like nginx/envoy, log shippers, audit agents, etc.) and extra init containers without forking the chart. Both default to empty list — no behavior change for existing users. Use case driving this: GovSignals' FedStart deployments need an in-pod nginx TLS sidecar so supervisor / register-tasks can talk to the webapp over TLS without going through the cluster-edge oauth2-proxy. The umbrella umbrella-style patterns we'd otherwise need (kustomize post-render, fork the webapp template) are all worse. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cccce08 commit 5ac9228

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ spec:
8282
volumeMounts:
8383
- name: shared
8484
mountPath: /home/node/shared
85+
{{- with .Values.webapp.extraInitContainers }}
86+
{{- toYaml . | nindent 8 }}
87+
{{- end }}
8588
containers:
8689
- name: token-syncer
8790
image: {{ include "trigger-v4.webapp.tokenSyncer.image" . }}
@@ -404,6 +407,9 @@ spec:
404407
{{- with .Values.webapp.extraVolumeMounts }}
405408
{{- toYaml . | nindent 12 }}
406409
{{- end }}
410+
{{- with .Values.webapp.extraContainers }}
411+
{{- toYaml . | nindent 8 }}
412+
{{- end }}
407413
volumes:
408414
- name: shared
409415
{{- if .Values.persistence.shared.enabled }}

hosting/k8s/helm/values.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,29 @@ webapp:
172172
# mountPath: /etc/ssl/certs
173173
# readOnly: true
174174

175+
# Extra containers added to the webapp pod (sidecars). Useful for
176+
# in-pod TLS (nginx, envoy), log shippers, audit agents, etc.
177+
extraContainers:
178+
[]
179+
# - name: nginx-tls
180+
# image: nginx:alpine
181+
# ports:
182+
# - name: https-internal
183+
# containerPort: 3031
184+
# volumeMounts:
185+
# - name: nginx-config
186+
# mountPath: /etc/nginx/conf.d
187+
# - name: nginx-tls-certs
188+
# mountPath: /etc/nginx/tls
189+
190+
# Extra init containers added to the webapp pod, scheduled after the
191+
# built-in `volume-permissions` init.
192+
extraInitContainers:
193+
[]
194+
# - name: wait-for-secrets
195+
# image: busybox
196+
# command: [...]
197+
175198
# ServiceMonitor for Prometheus monitoring
176199
serviceMonitor:
177200
enabled: false

0 commit comments

Comments
 (0)