Skip to content

feat(chart): support external postgres and secret-sourced db passwords - #314

Merged
cmdoret merged 6 commits into
mainfrom
fix/chart-external-postgres
Sep 17, 2026
Merged

cmdoret merged 6 commits into
mainfrom
fix/chart-external-postgres

Conversation

@sabinem

@sabinem sabinem commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

The chart addressed postgres by a name derived from its own release and rendered the backend's database password into a ConfigMap, so it could only ever talk to the postgres it installed itself, with a password copied into a values file.

  • backend.config.database.host is now read (it was documented but inert); empty still falls back to -postgresql.
  • backend.config.database.existingSecret / existingSecretPasswordKey let an operator or secret store own the credentials. The same keys under keycloak.database.external are passed to the keycloak subchart.
  • The password now always travels in a Secret, chart-managed when no existingSecret is given, injected as HACKAGON_DATABASE_PASSWORD, which koanf layers over the mounted config.yaml. No backend change needed.
  • keycloak-init-configmap is gated on postgresql.enabled: an external postgres is expected to have its roles already, so neither password has to be supplied in plaintext.
  • validations.yaml collects the combinations the chart cannot render, replacing two assigned-but-unused variables in keycloak-realm-configmap that existed only to force a required.
  • Fix keycloak.database.external.database/.user, which the subchart reads as name/username, so both were silently ignored.

Chart version 0.4.0 -> 0.5.0.

@sabinem
sabinem marked this pull request as draft September 16, 2026 08:51
@cmdoret cmdoret linked an issue Sep 17, 2026 that may be closed by this pull request
sabinem and others added 2 commits September 17, 2026 11:48
The chart addressed postgres by a name derived from its own release and
rendered the backend's database password into a ConfigMap, so it could
only ever talk to the postgres it installed itself, with a password
copied into a values file.

- backend.config.database.host is now read (it was documented but inert);
  empty still falls back to <release>-postgresql.
- backend.config.database.existingSecret / existingSecretPasswordKey let
  an operator or secret store own the credentials. The same keys under
  keycloak.database.external are passed to the keycloak subchart.
- The password now always travels in a Secret, chart-managed when no
  existingSecret is given, injected as HACKAGON_DATABASE_PASSWORD, which
  koanf layers over the mounted config.yaml. No backend change needed.
- keycloak-init-configmap is gated on postgresql.enabled: an external
  postgres is expected to have its roles already, so neither password
  has to be supplied in plaintext.
- validations.yaml collects the combinations the chart cannot render,
  replacing two assigned-but-unused variables in keycloak-realm-configmap
  that existed only to force a `required`.
- Fix keycloak.database.external.database/.user, which the subchart reads
  as name/username, so both were silently ignored.

Chart version 0.4.0 -> 0.5.0.
@cmdoret
cmdoret force-pushed the fix/chart-external-postgres branch from 5471648 to 397343f Compare September 17, 2026 09:49
@cmdoret
cmdoret marked this pull request as ready for review September 17, 2026 10:42
@cmdoret
cmdoret merged commit 4d9db22 into main Sep 17, 2026
3 checks passed
@cmdoret
cmdoret deleted the fix/chart-external-postgres branch September 17, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(chart): support external postgres

2 participants