Skip to content

Commit 61a0d61

Browse files
fix(helm): support secrets.existingSecret for core secrets
When users set secrets.enabled=false to use an external secret via secrets.existingSecret, the environment variables SESSION_SECRET, MAGIC_LINK_SECRET, ENCRYPTION_KEY, and MANAGED_WORKER_SECRET were not being populated from the secret. The templates only checked `if .Values.secrets.enabled` before setting these env vars. This change updates the condition to also check for `secrets.existingSecret`, so users can reference an existing Kubernetes Secret instead of having the chart create one. Fixes #2859 Co-authored-by: nicktrn <[email protected]>
1 parent cf0aa9b commit 61a0d61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hosting/k8s/helm/templates/supervisor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ spec:
151151
{{- else }}
152152
value: {{ .Values.supervisor.bootstrap.workerToken.value | quote }}
153153
{{- end }}
154-
{{- if .Values.secrets.enabled }}
154+
{{- if or .Values.secrets.enabled .Values.secrets.existingSecret }}
155155
- name: MANAGED_WORKER_SECRET
156156
valueFrom:
157157
secretKeyRef:

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ spec:
263263
- name: DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT
264264
value: {{ .Values.webapp.limits.defaultOrgExecutionConcurrencyLimit | quote }}
265265
{{- end }}
266-
{{- if .Values.secrets.enabled }}
266+
{{- if or .Values.secrets.enabled .Values.secrets.existingSecret }}
267267
- name: SESSION_SECRET
268268
valueFrom:
269269
secretKeyRef:

0 commit comments

Comments
 (0)