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

#2067 - Patroni creds change from Superuser to Databaseuser in DB Backup #2092

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions devops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,10 @@ db-backup-deploy-patroni:
-p CUSTOM_CONFIG_FILE_NAME=$(PATRONI_SIMSDB_BACKUP_CONFIG_FILE_NAME) \
-p VERIFICATION_VOLUME_NAME=$(PATRONI_SIMSDB_BACKUP_APP_NAME)-verification-pvc \
-p DATABASE_DEPLOYMENT_NAME=patroni-creds \
-p DATABASE_USER_KEY_NAME=superuser-username \
-p DATABASE_PASSWORD_KEY_NAME=superuser-password \
-p DATABASE_USER_KEY_NAME=database-user \
-p DATABASE_PASSWORD_KEY_NAME=database-password \
-p ENVIRONMENT_FRIENDLY_NAME='SIMS $(NAMESPACE) POSTGRESQL DB Backups' \
-p TABLE_SCHEMA='sims' \
| oc -n $(NAMESPACE) apply -f -

db-backup-deploy-patroni-delete:
Expand Down
2 changes: 2 additions & 0 deletions devops/openshift/database-backup/patroni-simsdb-backup.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ postgres=patroni-master:5432/SIMSDB

# Run a backup at 1am Pacific every day.
0 1 * * * default ./backup.sh -s
# Run verification at 4am Pacific every day.
0 4 * * * default ./backup.sh -s -v all
5 changes: 1 addition & 4 deletions devops/openshift/database/patroni-pre-req.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ objects:
superuser-username: ${PATRONI_SUPERUSER_USERNAME}
superuser-password: ${PATRONI_SUPERUSER_PASSWORD}
database-name: ${APP_DB_NAME}
database-user: app_api_${APP_DB_USERNAME}
database-user: app_database_user
database-password: ${APP_DB_PASSWORD}
- apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -113,9 +113,6 @@ parameters:
displayName: Replication Password
generate: expression
from: "[a-zA-Z0-9]{32}"
- name: APP_DB_USERNAME
generate: expression
from: "[a-zA-Z0-9]{8}"
- name: APP_DB_NAME
value: SIMSDB
- name: APP_DB_PASSWORD
Expand Down