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

#3882 - EDW API - DB User Part 1 #4211

Merged
merged 9 commits into from
Jan 14, 2025
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
6 changes: 5 additions & 1 deletion devops/helm/crunchy-postgres/templates/PostgresCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ spec:
databases:
- {{ template "crunchy-postgres.fullname" . }}
options: "CREATEROLE"
- name: {{ .Values.readonlyuser }}
guru-aot marked this conversation as resolved.
Show resolved Hide resolved
databases:
- {{ template "crunchy-postgres.fullname" . }}
dheepak-aot marked this conversation as resolved.
Show resolved Hide resolved
options: "LOGIN"
- name: postgres
databases:
- {{ template "crunchy-postgres.fullname" . }}
Expand Down Expand Up @@ -146,7 +150,7 @@ spec:
wal_buffers: {{ .Values.patroni.postgresql.parameters.wal_buffers }}
min_wal_size: {{ .Values.patroni.postgresql.parameters.min_wal_size }}
max_wal_size: {{ .Values.patroni.postgresql.parameters.max_wal_size }}
max_slot_wal_keep_size: {{ .Values.patroni.postgresql.parameters.max_slot_wal_keep_size }}
max_slot_wal_keep_size: {{ .Values.patroni.postgresql.parameters.max_slot_wal_keep_size }}

proxy:
pgBouncer:
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-0c27fb-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-0c27fb-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user
guru-aot marked this conversation as resolved.
Show resolved Hide resolved

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-0c27fb-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-a6ef19-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-a6ef19-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
1 change: 1 addition & 0 deletions devops/helm/crunchy-postgres/values-a6ef19-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
fullnameOverride: simsdb
appuser: app-database-user
nonsuperuser: non-super-user
readonlyuser: read-only-user

crunchyImage: # it's not necessary to specify an image as the images specified in the Crunchy Postgres Operator will be pulled by default
#crunchyImage: artifacts.developer.gov.bc.ca/bcgov-docker-local/crunchy-postgres-gis:ubi8-15.2-3.3-0 # use this image for POSTGIS
Expand Down
32 changes: 28 additions & 4 deletions sources/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,48 @@ workers:
# Enable local DB connection to Openshift DEV/TEST/STG/PROD
connect-dev-db:
@echo "Forward local port 5454 to Openshift simsdb-pgbouncer default port."
@echo "Use your prefered DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5454."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5454."
@oc project 0c27fb-dev
@oc port-forward services/simsdb-pgbouncer 5454:5432

connect-test-db:
@echo "Forward local port 5555 to Openshift simsdb-pgbouncer default port."
@echo "Use your prefered DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5555."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5555."
@oc project 0c27fb-test
@oc port-forward services/simsdb-pgbouncer 5555:5432

connect-stg-db:
@echo "Forward local port 5656 to Openshift simsdb-pgbouncer default port."
@echo "Use your prefered DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5656."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5656."
@oc project a6ef19-test
@oc port-forward services/simsdb-pgbouncer 5656:5432

connect-prod-db:
@echo "Forward local port 5757 to Openshift simsdb-pgbouncer default port."
@echo "Use your prefered DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5757."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5757."
@oc project 0c27fb-prod
@oc port-forward services/simsdb-pgbouncer 5757:5432

connect-dev-db-superuser:
andrewsignori-aot marked this conversation as resolved.
Show resolved Hide resolved
@echo "Forward local port 5858 to Openshift master pod default port."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5858."
@oc project 0c27fb-dev
@oc port-forward $(MASTER_POD) 5858:5432

connect-test-db-superuser:
@echo "Forward local port 5959 to Openshift master pod default port."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 5959."
@oc project 0c27fb-test
@oc port-forward $(MASTER_POD) 5959:5432

connect-stg-db-superuser:
@echo "Forward local port 6060 to Openshift master pod default port."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 6060."
@oc project a6ef19-test
@oc port-forward $(MASTER_POD) 6060:5432

connect-prod-db-superuser:
@echo "Forward local port 6161 to Openshift master pod default port."
@echo "Use your preferred DB Manager (e.g. pgAdmin or DBeaver) to connect to the Postgres database using the local port 6161."
@oc project 0c27fb-prod
@oc port-forward $(MASTER_POD) 6161:5432
Loading