Skip to content

Commit

Permalink
Merge branch 'task/patroni-1-replica' of github.com:bcgov/wps into ta…
Browse files Browse the repository at this point in the history
…sk/patroni-1-replica
  • Loading branch information
conbrad committed Jan 29, 2024
2 parents 1c7157e + fc1b66a commit fe70cbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions openshift/scripts/oc_provision_nats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ OC_PROCESS="oc -n ${PROJ_TARGET} process -f ${PATH_NATS} \
-p SUFFIX=${SUFFIX} \
-p IMAGE_NAME=${APP_NAME}-api-${SUFFIX} \
-p IMAGE_TAG=${SUFFIX} \
-p POSTGRES_USER=wps \
-p POSTGRES_USER=wps-crunchydb-${SUFFIX} \
-p POSTGRES_DATABASE=wps \
-p POSTGRES_WRITE_HOST=patroni-wps-${SUFFIX}-leader \
-p POSTGRES_READ_HOST=patroni-wps-${SUFFIX}-replica \
-p POSTGRES_WRITE_HOST=wps-crunchydb-${SUFFIX}-primary \
-p POSTGRES_READ_HOST=wps-crunchydb-${SUFFIX}-primary \
-p CRUNCHYDB_USER=wps-crunchydb-${SUFFIX}-pguser-wps-crunchydb-${SUFFIX} \
-p APP_NAME=${APP_NAME}"

# Apply a template (apply or use --dry-run=client)
Expand Down
7 changes: 5 additions & 2 deletions openshift/templates/nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ parameters:
description: Name of global Module
value: wps-global
required: true
- name: CRUNCHYDB_USER
description: Name of crunchydb user details key
required: true
- name: POSTGRES_WRITE_HOST
required: true
- name: POSTGRES_READ_HOST
Expand Down Expand Up @@ -285,8 +288,8 @@ objects:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: ${GLOBAL_NAME}
key: app-db-password
name: ${CRUNCHYDB_USER}
key: password
- name: POSTGRES_WRITE_HOST
value: ${POSTGRES_WRITE_HOST}
- name: POSTGRES_READ_HOST
Expand Down

0 comments on commit fe70cbd

Please sign in to comment.