Skip to content

Commit f35e1c4

Browse files
committed
fix(helm): require the app's ENCRYPTION_KEY on the migrations init container
1 parent 8f51640 commit f35e1c4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎helm/sim/templates/deployment-app.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec:
8080
secretKeyRef:
8181
name: {{ include "sim.appSecretName" $ }}
8282
key: {{ $key }}
83-
optional: true
83+
optional: {{ eq $key "ENCRYPT_ACCOUNT_TOKENS" }}
8484
{{- end }}
8585
{{- end }}
8686
envFrom:

‎helm/sim/tests/secret-modes_test.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ tests:
154154
content:
155155
name: ENCRYPTION_KEY
156156
valueFrom:
157-
secretKeyRef: { name: t-sim-app-secrets, key: ENCRYPTION_KEY, optional: true }
157+
secretKeyRef: { name: t-sim-app-secrets, key: ENCRYPTION_KEY, optional: false }
158158
- contains:
159159
path: spec.template.spec.initContainers[0].env
160160
content:
@@ -178,7 +178,7 @@ tests:
178178
content:
179179
name: ENCRYPTION_KEY
180180
valueFrom:
181-
secretKeyRef: { name: my-existing-secret, key: ENCRYPTION_KEY, optional: true }
181+
secretKeyRef: { name: my-existing-secret, key: ENCRYPTION_KEY, optional: false }
182182

183183
- it: an extraEnvVars sealing opt-out reaches the migrations init container
184184
template: deployment-app.yaml

0 commit comments

Comments
 (0)