Skip to content

Commit

Permalink
Merge pull request #184 from bcgov/postgresProdUpgrade
Browse files Browse the repository at this point in the history
feat: produpgrade
  • Loading branch information
thegentlemanphysicist authored Oct 7, 2022
2 parents 58f8082 + 3889f83 commit cb7b0e3
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/silver-custom-gold-custom-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
17 changes: 17 additions & 0 deletions helm/backup-storage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
These charts can be upgraded using make commands:

`make upgrade NAME=patroni-backup-storage NAMESPACE=<<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`
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -17,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
Expand Down
Original file line number Diff line number Diff line change
@@ -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=6d70e7-dev

nameOverride: "sso-backup-storage"
fullnameOverride: "sso-backup-storage"

Expand Down
22 changes: 11 additions & 11 deletions helm/backup-storage/values-6d70e7-prod-patroni-backup-storage.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# 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=6d70e7-prod

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

persistence:
backup:
size: 42Gi
verification:
size: 10Gi
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"
Expand Down
Original file line number Diff line number Diff line change
@@ -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=6d70e7-test

nameOverride: "sso-backup-storage"
fullnameOverride: "sso-backup-storage"

Expand Down
11 changes: 7 additions & 4 deletions helm/keycloak/values-6d70e7-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions helm/silver-patroni/values-6d70e7-prod.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cb7b0e3

Please sign in to comment.