From 8a7eed786c704cde7460b2be9effbb3437a6a3e5 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Fri, 7 Oct 2022 08:36:33 -0700 Subject: [PATCH 1/3] feat: produpgrade --- ...alues-6d70e7-dev-patroni-backup-storage.yaml | 2 +- ...lues-6d70e7-prod-patroni-backup-storage.yaml | 12 ++++++------ ...lues-6d70e7-test-patroni-backup-storage.yaml | 2 +- helm/keycloak/values-6d70e7-prod.yaml | 11 +++++++---- helm/silver-patroni/values-6d70e7-prod.yaml | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 helm/silver-patroni/values-6d70e7-prod.yaml diff --git a/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml index e9235354..cc6e411d 100644 --- a/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml @@ -1,5 +1,5 @@ # The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-master-dev:5432/rhsso +# ./backup.sh -r postgres=sso-pgsql-dev-11-patroni:5432/rhsso # The command to update the backup in sandbox dev is: # make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-dev diff --git a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml index e400c15c..ad4d64f0 100644 --- a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml @@ -1,5 +1,5 @@ # The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-master-dev:5432/rhsso +# ./backup.sh -r postgres=sso-pgsql-prod-11-patroni:5432/rhsso # The command to update the backup in sandbox dev is: # make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-prod @@ -7,18 +7,18 @@ nameOverride: "sso-backup-storage" fullnameOverride: "sso-backup-storage" backupConfig: | - postgres=sso-pgsql-master-prod:5432/rhsso + postgres=sso-pgsql-prod-11-patroni:5432/rhsso 0 1 * * * default ./backup.sh -s 0 4 * * * default ./backup.sh -s -v all db: - secretName: sso-pgsql-prod - usernameKey: app-db-username - passwordKey: app-db-password + secretName: patroni-11-prod-secret + usernameKey: username + passwordKey: password env: DATABASE_SERVICE_NAME: - value: sso-pgsql-master-prod + value: sso-pgsql-prod-11-patroni ENVIRONMENT_FRIENDLY_NAME: value: "Silver SSO production-prod DB Backups" diff --git a/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml index 90823837..8e4aa4db 100644 --- a/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml @@ -1,5 +1,5 @@ # The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-master-dev:5432/rhsso +# ./backup.sh -r postgres=patroni-11-test-secret:5432/rhsso # The command to update the backup in sandbox dev is: # make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-test diff --git a/helm/keycloak/values-6d70e7-prod.yaml b/helm/keycloak/values-6d70e7-prod.yaml index 6cf89609..fd920a22 100644 --- a/helm/keycloak/values-6d70e7-prod.yaml +++ b/helm/keycloak/values-6d70e7-prod.yaml @@ -10,12 +10,15 @@ service: port: 8443 postgres: - host: sso-pgsql-master-prod + host: sso-pgsql-prod-11-patroni database: rhsso credentials: - secret: sso-pgsql-prod - usernameKey: app-db-username - passwordKey: app-db-password + secret: patroni-11-prod-secret + usernameKey: username + passwordKey: password + +persistentLog: + storageClassSize: 15Gi tls: enabled: true diff --git a/helm/silver-patroni/values-6d70e7-prod.yaml b/helm/silver-patroni/values-6d70e7-prod.yaml new file mode 100644 index 00000000..cb73bd80 --- /dev/null +++ b/helm/silver-patroni/values-6d70e7-prod.yaml @@ -0,0 +1,17 @@ +replicaCount: 3 + +image: + repository: ghcr.io/bcgov/spilo-14 + tag: 2.1-p5 + pullPolicy: IfNotPresent + +imagePullSecrets: + - name: gh-registry-config + +postgresMajorVersion: 11 + +persistentVolume: + size: 30Gi + +podDisruptionBudget: + enabled: true From 8de123099275c1c36cb3408d568afd7b7ec1e4a7 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Fri, 7 Oct 2022 09:12:00 -0700 Subject: [PATCH 2/3] feat: produpgrade --- helm/backup-storage/README.md | 17 +++++++++++++++++ ...alues-3d5c3f-dev-patroni-backup-storage.yaml | 5 ----- ...alues-6d70e7-dev-patroni-backup-storage.yaml | 5 ----- ...lues-6d70e7-prod-patroni-backup-storage.yaml | 5 ----- ...lues-6d70e7-test-patroni-backup-storage.yaml | 5 ----- 5 files changed, 17 insertions(+), 20 deletions(-) create mode 100644 helm/backup-storage/README.md diff --git a/helm/backup-storage/README.md b/helm/backup-storage/README.md new file mode 100644 index 00000000..09236b9b --- /dev/null +++ b/helm/backup-storage/README.md @@ -0,0 +1,17 @@ +These charts can be upgraded using make commands: + +`make upgrade NAME=patroni-backup-storage NAMESPACE=<>` + +To restore from the most recent backup, rsh into the backup pod in the namespace in question and run: + +**dev silver production**: + +`./backup.sh -r postgres=sso-pgsql-dev-11-patroni:5432/rhsso` + +**test silver production**: + +`./backup.sh -r postgres=sso-pgsql-test-11-patroni:5432/keycloak` + +**prod silver production**: + +`./backup.sh -r postgres=sso-pgsql-prod-11-patroni:5432/rhsso` diff --git a/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml b/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml index 73a275bc..0e06125f 100644 --- a/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml @@ -1,8 +1,3 @@ -# The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-master-dev:5432/rhsso -# The command to update the backup in sandbox dev is: -# make upgrade NAME=patroni-backup-storage NAMESPACE=3d5c3f-dev - nameOverride: "sso-backup-storage" fullnameOverride: "sso-backup-storage" diff --git a/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml index cc6e411d..8495a2cd 100644 --- a/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-dev-patroni-backup-storage.yaml @@ -1,8 +1,3 @@ -# The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-dev-11-patroni:5432/rhsso -# The command to update the backup in sandbox dev is: -# make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-dev - nameOverride: "sso-backup-storage" fullnameOverride: "sso-backup-storage" diff --git a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml index ad4d64f0..d972b221 100644 --- a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml @@ -1,8 +1,3 @@ -# The command to restore the latest backup is: -# ./backup.sh -r postgres=sso-pgsql-prod-11-patroni:5432/rhsso -# The command to update the backup in sandbox dev is: -# make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-prod - nameOverride: "sso-backup-storage" fullnameOverride: "sso-backup-storage" diff --git a/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml index 8e4aa4db..7c894c26 100644 --- a/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-test-patroni-backup-storage.yaml @@ -1,8 +1,3 @@ -# The command to restore the latest backup is: -# ./backup.sh -r postgres=patroni-11-test-secret:5432/rhsso -# The command to update the backup in sandbox dev is: -# make upgrade NAME=patroni-backup-storage NAMESPACE=6d70e7-test - nameOverride: "sso-backup-storage" fullnameOverride: "sso-backup-storage" From 3889f83a37486b757421e54b2bcfcb485ad2b744 Mon Sep 17 00:00:00 2001 From: Jonathan Sharman Date: Fri, 7 Oct 2022 09:41:18 -0700 Subject: [PATCH 3/3] feat: upgradepost fix backup process, and the github issue template --- .github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml | 4 ++-- .../values-3d5c3f-dev-patroni-backup-storage.yaml | 5 +++++ .../values-6d70e7-prod-patroni-backup-storage.yaml | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml b/.github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml index e806e921..4632def9 100644 --- a/.github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml +++ b/.github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml @@ -83,8 +83,8 @@ body: attributes: value: | ## Additional Information ## - Please create your IDP via our [Common Hosted Single Sign on App](https://bcgov.github.io/sso-requests) - [How to guide can be found here](https://stackoverflow.developer.gov.bc.ca/questions/864) + Please create your IDP via our [Common Hosted Single Sign on App](https://bcgov.github.io/sso-requests) + [How to guide can be found here](https://stackoverflow.developer.gov.bc.ca/questions/864) - type: checkboxes id: terms attributes: diff --git a/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml b/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml index 0e06125f..2243c6fd 100644 --- a/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-3d5c3f-dev-patroni-backup-storage.yaml @@ -12,6 +12,11 @@ db: usernameKey: app-db-username passwordKey: app-db-password +persistence: + backup: + size: 6Gi + verification: + size: 3Gi env: DATABASE_SERVICE_NAME: value: sso-pgsql-dev-11-patroni diff --git a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml index d972b221..69c34059 100644 --- a/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml +++ b/helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml @@ -11,6 +11,11 @@ db: usernameKey: username passwordKey: password +persistence: + backup: + size: 42Gi + verification: + size: 10Gi env: DATABASE_SERVICE_NAME: value: sso-pgsql-prod-11-patroni