Skip to content

Commit 7ff56f0

Browse files
authored
feat(deployment): move init-container connection string (#960)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent ee61cc1 commit 7ff56f0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

deployment/chainloop/templates/controlplane/config.secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type: Opaque
1414
data:
1515
# We store it also as a different key so it can be reused during upgrades by the common.secrets.passwords.manage helper
1616
generated_jws_hmac_secret: {{ $hmacpass }}
17+
db_migrate_source: {{include "controlplane.database.atlas_connection_string" . | b64enc | quote }}
1718
stringData:
1819
{{- if and .Values.sentry .Values.sentry.enabled }}
1920
{{- fail "configuring sentry at the top level is no longer supported. Add the configuration to the controlplane section in the values.yaml file" }}

deployment/chainloop/templates/controlplane/deployment.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,15 @@ spec:
4141
- migrate
4242
- apply
4343
- --url
44-
- "{{include "controlplane.database.atlas_connection_string" . }}"
44+
- $(CONNECTION_STRING)
4545
- --dir
4646
- file:///migrations
47+
env:
48+
- name: CONNECTION_STRING
49+
valueFrom:
50+
secretKeyRef:
51+
name: {{ include "chainloop.controlplane.fullname" . }}
52+
key: db_migrate_source
4753
containers:
4854
- name: {{ .Chart.Name }}
4955
securityContext:

0 commit comments

Comments
 (0)