Skip to content

Commit 40bfd5e

Browse files
committed
fix(helm): only check the realtime placeholder when realtime is enabled
1 parent aabfdb0 commit 40bfd5e

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎helm/sim/templates/_helpers.tpl‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ Skip validation when using existing secrets or External Secrets Operator
289289
{{- range $key := list "BETTER_AUTH_SECRET" "ENCRYPTION_KEY" "INTERNAL_API_SECRET" "CRON_SECRET" "API_ENCRYPTION_KEY" }}
290290
{{- include "sim.rejectPlaceholderSecret" (list (printf "app.env.%s" $key) (index $.Values.app.env $key)) }}
291291
{{- end }}
292+
{{- if .Values.realtime.enabled }}
292293
{{- include "sim.rejectPlaceholderSecret" (list "realtime.env.BETTER_AUTH_SECRET" .Values.realtime.env.BETTER_AUTH_SECRET) }}
294+
{{- end }}
293295
{{- /* CRON_SECRET is required when cronjobs are enabled — pods reference it via secretKeyRef and would fail to start if the key is missing from the Secret. */ -}}
294296
{{- if and .Values.cronjobs.enabled (not .Values.app.env.CRON_SECRET) }}
295297
{{- fail "app.env.CRON_SECRET is required when cronjobs.enabled=true (every cron pod authenticates with this token). Generate one with: openssl rand -hex 32, or set cronjobs.enabled=false." }}

‎helm/sim/tests/smoke_test.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ tests:
4343
path: metadata.name
4444
pattern: "^acme-sim"
4545
template: deployment-app.yaml
46+
47+
- it: ignores a realtime placeholder secret when realtime is disabled
48+
template: deployment-app.yaml
49+
set:
50+
realtime.enabled: false
51+
realtime.env.BETTER_AUTH_SECRET: your-secure-production-auth-secret-here
52+
asserts:
53+
- isKind: { of: Deployment }

0 commit comments

Comments
 (0)