Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2329 Create db connection to Alembic for the CC team #2808

Merged
merged 9 commits into from
Apr 5, 2024
1 change: 1 addition & 0 deletions helm/_shared/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ global:
targetPort: 5432
databaseName: vro
schemaName: claims
domainCcSchemaName: domain-cc
16 changes: 16 additions & 0 deletions helm/domain-cc/templates/_alembicdb.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/*
For Alembic to connect to Postgres Domain-cc DB schema
*/}}
{{- define "domainCc.alembic.envVars" -}}
- name: DOMAIN_CC_USER
valueFrom:
secretKeyRef:
name: domain-cc-db
key: DOMAIN_CC_USER
- name: DOMAIN_CC_PW
valueFrom:
secretKeyRef:
name: domain-cc-db
key: DOMAIN_CC_PW
- name: ALEMBIC_SCHEMA
value: {{ .Values.global.service.db.domainCcSchemaName }}
2 changes: 2 additions & 0 deletions helm/domain-cc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
{{- include "vro.commonEnvVars" . | nindent 12 }}
{{- include "vro.mqClient.envVars" . | nindent 12 }}
{{- include "vro.redisClient.envVars" . | nindent 12 }}
{{- include "domainCc.alembic.envVars" . | nindent 12 }}
{{- include "vro.postgresUrl" . | nindent 12 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYSA @tyler-spangler6 this allows us to make use of DB_URL from env vars (e.g. os.environ.get() in python)
See linked file here.

resources:
requests:
cpu: 150m
Expand Down