fix: Postgres | apply custom pg_hba, add server DNS altname

This commit is contained in:
2024-09-04 17:09:34 +05:00
parent 4615c9f76e
commit f93c648e84

View File

@@ -12,13 +12,14 @@ spec:
certificates: certificates:
serverAltDNSNames: serverAltDNSNames:
- postgres.home - postgres.home
- localhost
postgresql: postgresql:
pg_hba: pg_hba:
- hostssl all all all cert - hostssl all shahab all cert
- hostssl giteadb gitea 10.42.0.0/16 md5 - hostssl all dogar all cert
enableSuperuserAccess: true - hostssl sameuser all all cert
superuserSecret: - hostssl giteadb gitea 10.42.0.0/16 scram-sha-256
name: postgres-password enableSuperuserAccess: false
bootstrap: bootstrap:
initdb: initdb:
database: postgres database: postgres
@@ -26,7 +27,12 @@ spec:
name: postgres-password name: postgres-password
postInitSQL: postInitSQL:
- 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";' - 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'
- 'CREATE USER shahab SUPERUSER CREATEROLE;' - 'CREATE USER shahab SUPERUSER;'
- 'CREATE USER dogar SUPERUSER;'
- 'CREATE USER leviathan;'
- 'CREATE DATABASE leviathan;'
- 'CREATE USER "schedule-consist";'
- 'CREATE DATABASE "schedule-consist";'
- 'CREATE DATABASE giteadb;' - 'CREATE DATABASE giteadb;'
storage: storage:
size: 1Gi size: 1Gi