Skip to content

Commit

Permalink
Merge pull request #18 from bcgov/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ychung-mot authored Mar 15, 2024
2 parents 3f63c3c + 00ac771 commit 4c3be7b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crunchydb/values-uat.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
crunchy-postgres:
fullnameOverride: strdss-uat
fullnameOverride: strdssuat
2 changes: 1 addition & 1 deletion helm/main/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ backend:
nameOverride: strdss-dev-backend
fullnameOverride: strdss-dev-backend
secretName: strdss-secrets-dev
dbSecretName: strdss-db-pguser-strdss-db
dbSecretName: strdssdev-pguser-strdssdev
crunchdb: false

# resources:
Expand Down
2 changes: 1 addition & 1 deletion helm/main/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ backend:
nameOverride: strdss-prod-backend
fullnameOverride: strdss-prod-backend
secretName: strdss-secrets-prod
dbSecretName: strdss-prod-pguser-strdss-prod
dbSecretName: strdssprod-pguser-strdssprod
crunchdb: true

resources:
Expand Down
8 changes: 4 additions & 4 deletions helm/main/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ backend:
nameOverride: strdss-test-backend
fullnameOverride: strdss-test-backend
secretName: strdss-secrets-test
dbSecretName: strdss-pguser-test
dbSecretName: strdsstest-pguser-strdsstest
crunchdb: false

resources:
limits:
cpu: 50m
memory: 100Mi
cpu: 200m
memory: 150Mi
requests:
cpu: 20m
memory: 50Mi
memory: 100Mi

env:
'API_HOST': '/api'
2 changes: 1 addition & 1 deletion helm/main/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ backend:
nameOverride: strdss-uat-backend
fullnameOverride: strdss-uat-backend
secretName: strdss-secrets-uat
dbSecretName: strdss-uat-pguser-strdss-uat
dbSecretName: strdssuat-pguser-strdssuat
crunchdb: true

resources:
Expand Down
19 changes: 13 additions & 6 deletions postgres/ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
oc login
oc project f4a30d-dev / test

helm install strdss-db-dev bitnami/postgresql -f values-dev.yaml
helm install strdssdev bitnami/postgresql -f values-dev.yaml

helm install strdss-db-test bitnami/postgresql -f values-test.yaml
helm install strdsstest bitnami/postgresql -f values-test.yaml

Enable PostGIS extension
https://github.com/bitnami/charts/issues/2830
Expand All @@ -15,12 +15,19 @@ Create Extension
CREATE EXTENSION postgis;

Create Database
CREATE DATABASE "strdss-dev";
CREATE DATABASE strdssdev;

CREATE ROLE "strdss-dev" WITH LOGIN PASSWORD '';
GRANT ALL PRIVILEGES ON DATABASE "strdss-dev" TO "strdss-dev";
CREATE ROLE strdssdev WITH LOGIN PASSWORD 'MMOv7RVwDS';


GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO strdssdev;

ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON TABLES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON SEQUENCES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON FUNCTIONS TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON TYPES TO strdssdev ;
ALTER DEFAULT PRIVILEGES FOR ROLE postgres GRANT ALL ON SCHEMAS TO strdssdev ;

Create Secret

oc port-forward svc/strdss-dev 5434:5432
oc port-forward svc/strdssdev 5433:5432
11 changes: 9 additions & 2 deletions postgres/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ primary:
enabled: false
persistence:
size: 200Mi
resources:
limits:
cpu: 150m
memory: 200Mi
requests:
cpu: 50m
memory: 150Mi
readReplicas:
persistence:
size: 200Mi
nameOverride: strdss-dev
fullnameOverride: strdss-dev
nameOverride: strdssdev
fullnameOverride: strdssdev
11 changes: 9 additions & 2 deletions postgres/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ primary:
enabled: false
persistence:
size: 200Mi
resources:
limits:
cpu: 150m
memory: 200Mi
requests:
cpu: 50m
memory: 150Mi
readReplicas:
persistence:
size: 200Mi
nameOverride: strdss-test
fullnameOverride: strdss-test
nameOverride: strdsstest
fullnameOverride: strdsstest

0 comments on commit 4c3be7b

Please sign in to comment.