From 6ab25153f70ced7d1a68cf28f0482dec8fd1e48a Mon Sep 17 00:00:00 2001 From: Toby Jennings Date: Wed, 8 Jan 2025 15:23:12 -0600 Subject: [PATCH] Add cmservice database option to postgres --- applications/postgres/secrets.yaml | 5 +++++ applications/postgres/templates/deployment.yaml | 11 +++++++++++ applications/postgres/values-usdf-cm-dev.yaml | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/applications/postgres/secrets.yaml b/applications/postgres/secrets.yaml index ed33a80e1d..d471e6dd35 100644 --- a/applications/postgres/secrets.yaml +++ b/applications/postgres/secrets.yaml @@ -1,3 +1,8 @@ +cmservice_password: + description: "Password for the cmservice database." + if: cmservice_db + generate: + type: password exposurelog_password: description: "Password for the exposurelog database." if: exposurelog_db diff --git a/applications/postgres/templates/deployment.yaml b/applications/postgres/templates/deployment.yaml index c04846f7b9..5025c17dda 100644 --- a/applications/postgres/templates/deployment.yaml +++ b/applications/postgres/templates/deployment.yaml @@ -110,6 +110,17 @@ spec: name: "postgres" key: "timessquare_password" {{- end }} + {{- with .Values.cmservice_db }} + - name: "VRO_DB_CMSERVICE_USER" + value: {{ .user | quote }} + - name: "VRO_DB_CMSERVICE_DB" + value: {{ .db | quote }} + - name: "VRO_DB_CMSERVICE_PASSWORD" + valueFrom: + secretKeyRef: + name: "postgres" + key: "cmservice_password" + {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" ports: diff --git a/applications/postgres/values-usdf-cm-dev.yaml b/applications/postgres/values-usdf-cm-dev.yaml index 79960946d4..80b7eff563 100644 --- a/applications/postgres/values-usdf-cm-dev.yaml +++ b/applications/postgres/values-usdf-cm-dev.yaml @@ -2,4 +2,8 @@ gafaelfawr_db: user: 'gafaelfawr' db: 'gafaelfawr' +cmservice_db: + user: 'cmservice' + db: 'cmservice' + postgresStorageClass: 'wekafs--sdf-k8s01'