Skip to content

Commit

Permalink
feat(helm): add init script to setup initial database
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoscode committed Jun 2, 2023
1 parent a16ba13 commit fb2c770
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions charts/managed-identity-wallet/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ingress:
- managed-identity-wallet-new.dev.demo.catena-x.net

postgresql:
primary:
initdb:
password: <path:managed-identity-wallets/data/dev/postgres-managed-identity-wallets-secret-config#postgres-password>
auth:
password: <path:managed-identity-wallets/data/dev/postgres-managed-identity-wallets-secret-config#password>
postgresPassword: <path:managed-identity-wallets/data/dev/postgres-managed-identity-wallets-secret-config#postgres-password>
Expand Down
10 changes: 9 additions & 1 deletion charts/managed-identity-wallet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ envs:
# APPLICATION_ENVIRONMENT: xxx
# DB_HOST: auto
# DB_PORT: xxx
# DB_NAME: xxx
# DB_NAME: xxx # set it also in the init script in the postgres initdb section below!!
# USE_SSL: xxx
# DB_POOL_SIZE: xxx
# KEYCLOAK_MIW_PUBLIC_CLIENT: xxx
Expand Down Expand Up @@ -99,6 +99,14 @@ affinity: {}
podAnnotations: {}

postgresql:
primary:
initdb:
scripts:
init_db_script.sh: |
#!/bin/sh
createdb -O postgres miw
user: postgres
password: postgres
auth:
password: postgres
username: postgres
Expand Down

0 comments on commit fb2c770

Please sign in to comment.