Skip to content

Commit

Permalink
chore: adding pg for voucher
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed May 22, 2024
1 parent 4139132 commit b5ec793
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
5 changes: 5 additions & 0 deletions charts/voucher/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ version: 0.1.0-dev
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.1.0
dependencies:
- name: postgresql
version: 11.9.6
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
7 changes: 7 additions & 0 deletions charts/voucher/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ ingress:
service:
port: 3000
type: ClusterIP
postgresql:
enabled: true
auth:
enablePostgresUser: false
username: voucher
password: voucher
database: voucher
resources: {}
8 changes: 7 additions & 1 deletion ci/testflight/voucher/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ resource "kubernetes_secret" "smoketest" {
}
}

resource "random_password" "postgresql" {
length = 20
special = false
}

resource "kubernetes_secret" "voucher" {
metadata {
name = "voucher"
Expand All @@ -36,7 +41,8 @@ resource "kubernetes_secret" "voucher" {
"next-auth-secret" : "dummy123"
"client-secret" : "dummy"
"escrow-api-key" : "dummy"
"pg-con" : "dummy"
pg-user-pw : random_password.postgresql.result
pg-con : "postgres://voucher:${random_password.postgresql.result}@voucher-postgresql:5432/voucher"
}
}

Expand Down
6 changes: 6 additions & 0 deletions ci/testflight/voucher/testflight-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ voucher:
coreUrl: "http://galoy-oathkeeper-proxy.galoy-staging-galoy.svc.cluster.local:4455/graphql"
voucherUrl: "http://localhost:3000"
nextAuthUrl: "http://voucher:3000"

postgresql:
auth:
existingSecret: voucher
secretKeys:
userPasswordKey: "pg-user-pw"
2 changes: 1 addition & 1 deletion dev/addons/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ k8s_yaml(secret_from_dict(
"next-auth-secret" : "dummy",
"client-secret" : "dummy",
"escrow-api-key" : "dummy",
"pg-con" : "dummy"
"pg-con" : 'postgres://voucher:voucher@voucher-postgresql:5432/voucher'
}
))

Expand Down

0 comments on commit b5ec793

Please sign in to comment.