Skip to content

Commit f19ee10

Browse files
authored
Merge pull request #225 from bcgov/chore/222-pgo-migration-cleanup
Chore/222 pgo migration cleanup
2 parents a03b633 + ebb27b1 commit f19ee10

File tree

6 files changed

+5
-68
lines changed

6 files changed

+5
-68
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ install_pgo_cluster:
3131
helm upgrade --install --atomic --timeout 3000s \
3232
--namespace $(OC_PROJECT) \
3333
--values ./helm/cas-shipit-postgres-cluster/values.yaml \
34-
cas-shipit-db cas-postgres/cas-postgres;
34+
cas-shipit-db cas-postgres/cas-postgres-cluster
3535

3636
# TODO: Remove cas-postgres and add PG-Cluster deployment
3737
.PHONY: install

helm/cas-shipit/Chart.lock

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
dependencies:
2-
- name: cas-postgres
3-
repository: https://bcgov.github.io/cas-postgres/
4-
version: 0.9.1
52
- name: redis
63
repository: https://charts.bitnami.com/bitnami
74
version: 19.1.3
8-
- name: patroni-migration
9-
repository: https://bcgov.github.io/cas-postgres/
10-
version: 1.0.1
11-
digest: sha256:aa784ba08ebf492ff94c0f4fa2cde7f325848c5f742d528a28d3c5362ea8b8b7
12-
generated: "2025-07-15T12:17:52.193980815-06:00"
5+
digest: sha256:809e77866fb1d1828f2255344e429cb5b62ea6e098314dbb01156ad0dd4f12c4
6+
generated: "2025-08-05T15:45:27.000841738-06:00"

helm/cas-shipit/Chart.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ type: application
55
version: 0.1.4
66
appVersion: 0.39.0
77
dependencies:
8-
- name: cas-postgres
9-
version: 0.9.1
10-
repository: https://bcgov.github.io/cas-postgres/
118
- name: redis
129
version: 19.1.3
1310
repository: https://charts.bitnami.com/bitnami
14-
- name: patroni-migration
15-
version: 1.0.1
16-
repository: https://bcgov.github.io/cas-postgres/

helm/cas-shipit/templates/cronjob/shipit-hourly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ spec:
3737
activeDeadlineSeconds: 3600
3838
schedule: 0 */1 * * *
3939
successfulJobsHistoryLimit: 1
40-
suspend: true
40+
suspend: false

helm/cas-shipit/templates/cronjob/shipit-minutely.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ spec:
3636
activeDeadlineSeconds: 300
3737
schedule: "*/5 * * * *"
3838
successfulJobsHistoryLimit: 1
39-
suspend: true
39+
suspend: false

helm/cas-shipit/values.yaml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,6 @@ database:
3232
chartName: cas-postgres-cluster
3333
user: shipit
3434

35-
# TODO: Remove this once PGO is deployed
36-
cas-postgres:
37-
patroni:
38-
resources:
39-
limits:
40-
cpu: 250m
41-
memory: 500Mi
42-
requests:
43-
cpu: 20m
44-
memory: 400Mi
45-
persistentVolume:
46-
storageClass: netapp-block-standard
47-
size: 4Gi
48-
replicaCount: 3
49-
env:
50-
ALLOW_NOSSL: true
51-
5235
redis:
5336
global:
5437
imagePullSecrets:
@@ -83,37 +66,3 @@ redis:
8366
# We are providing our own secret as the redis chart regenerates the password with every deploy
8467
existingSecret: cas-shipit-redis
8568
existingSecretPasswordKey: redis-password
86-
87-
patroni-migration:
88-
migrationJob:
89-
image: postgres
90-
tag: 17
91-
92-
deployment:
93-
sourceReleaseName: cas-shipit
94-
name: cas-shipit-web
95-
targetReleaseName: cas-shipit-db
96-
originalReplicaCount: 3
97-
98-
from:
99-
# Assuming all database information will be in the same secret
100-
# Pass either the secret's key or the specific value
101-
secretName: cas-shipit-patroni
102-
hostSecretKey: ~
103-
host: cas-shipit-patroni.0fad32-tools.svc.cluster.local
104-
passwordSecretKey: password-superuser
105-
password: ~
106-
portSecretKey: ~
107-
port: 5432
108-
userSecretKey: ~
109-
user: postgres
110-
111-
# The name of the database to migrate
112-
db: postgres
113-
114-
to:
115-
# This is necessarily a PGO deployment
116-
# superuser to migrate roles
117-
superuserSecretName: cas-shipit-db-cas-postgres-cluster-pguser-postgres
118-
# new owner of database to run own the migrated database
119-
appuserSecretName: cas-shipit-db-cas-postgres-cluster-pguser-shipit

0 commit comments

Comments
 (0)