FIX(postgresql): vault PostgreSQL connection
- using environment variable - Removed hardcoded connection_url from config - Use VAULT_PG_CONNECTION_URL environment variable instead - Connection URL stored securely in vault-pg-connection Secret - Fixes environment variable substitution issue in HCL config
This commit is contained in:
@@ -25,7 +25,6 @@ server:
|
|||||||
}
|
}
|
||||||
|
|
||||||
storage "postgresql" {
|
storage "postgresql" {
|
||||||
connection_url = "postgres://vault:${VAULT_POSTGRES_PASSWORD}@postgresql-cnpg-rw.postgresql-cnpg.svc.cluster.local:5432/vault?sslmode=disable"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Optional: Enable Prometheus metrics
|
# Optional: Enable Prometheus metrics
|
||||||
@@ -36,9 +35,9 @@ server:
|
|||||||
|
|
||||||
# Environment variables from secrets
|
# Environment variables from secrets
|
||||||
extraSecretEnvironmentVars:
|
extraSecretEnvironmentVars:
|
||||||
- envName: VAULT_POSTGRES_PASSWORD
|
- envName: VAULT_PG_CONNECTION_URL
|
||||||
secretName: vault-postgres-password
|
secretName: vault-pg-connection
|
||||||
secretKey: password
|
secretKey: connection_url
|
||||||
|
|
||||||
# 리소스 제한
|
# 리소스 제한
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
Reference in New Issue
Block a user