Skip to content

fix(helm): default PostgreSQL to the official maintained image - #1582

Draft
ojasshelke46 wants to merge 1 commit into
flatcar:mainfrom
ojasshelke46:fix/postgresql-maintained-image
Draft

fix(helm): default PostgreSQL to the official maintained image#1582
ojasshelke46 wants to merge 1 commit into
flatcar:mainfrom
ojasshelke46:fix/postgresql-maintained-image

Conversation

@ojasshelke46

Copy link
Copy Markdown

Fixes #1574

Summary

The chart pulled PostgreSQL from bitnamilegacy/postgresql, the frozen
archive Bitnami moved its free catalog into when it retired free image
maintenance. Never rebuilt, so every PostgreSQL and OS-package CVE
published from now on stays unpatched in it. #1227 moved here as a
stopgap when the free catalog was retired; this is the follow-up
discussed in #1574.

What changed

  • Default image is now docker.io/postgres:17.10-trixie
  • Data directory moves to /var/lib/postgresql/pgdata — the official
    image has no /bitnami tree, and PGDATA has to be a subdirectory
    the container user creates itself, since /var/lib/postgresql and
    its data subdirectory ship 1777, which Postgres rejects. Volume
    mount path moves accordingly.
  • No template changes needed — the subchart drives the image through
    POSTGRES_USER/POSTGRES_PASSWORD/POSTGRES_DB/PGDATA, all
    honored by docker.io/postgres.
  • README documents the migration path for existing deployments with
    persistence enabled — in-place PVC reuse does not work, since Bitnami
    keeps postgresql.conf/pg_hba.conf outside the data directory and
    its image was built against a different glibc, so a dump and restore
    is required.
  • CHANGELOG entry under Security.

Test plan

Verified on a local kind cluster (deleted after testing):

  • helm lint clean
  • Fresh install, persistence disabled (default) — pods Ready
  • Fresh install, persistence enabled — data survives pod delete/restart
  • Migrations apply (18 tables, seeded "Flatcar Container Linux" app)
  • /health returns 200
  • Omaha /v1/update returns a real package manifest
  • Non-default postgresql.auth.username variant works

The chart pulled PostgreSQL from bitnamilegacy/postgresql, the frozen
archive Bitnami moved its free catalog into when it was retired. Those
images are still downloadable but are never rebuilt, so every PostgreSQL
or OS-package CVE published from now on stays unpatched in them. The
Bitnami Legacy switch in flatcar#1227 was a stopgap to keep installs working;
this is the follow-up.

- Default image is now docker.io/postgres:17.10-trixie
- The subchart drives the official image through
  POSTGRES_USER/POSTGRES_PASSWORD/POSTGRES_DB and PGDATA, all of which
  docker.io/postgres honours, so no template changes are needed
- The data directory moves to /var/lib/postgresql/pgdata: the official
  image has no /bitnami tree, and PGDATA must be a subdirectory the
  container user creates itself because /var/lib/postgresql and
  /var/lib/postgresql/data ship as 1777, which PostgreSQL rejects
- Volume mount path moves accordingly to /var/lib/postgresql

Existing deployments with persistence enabled need a dump and restore:
the Bitnami image keeps postgresql.conf and pg_hba.conf outside the data
directory, and its cluster was initialised against a different glibc.
The README documents the migration.

Verified on kind: fresh install with and without persistence, data
survives a pod restart, Nebraska migrations apply, and an Omaha
updatecheck returns a package.

Signed-off-by: Ojas Shelke <ojasshelke733@gmail.com>
@ojasshelke46
ojasshelke46 force-pushed the fix/postgresql-maintained-image branch from 3734b62 to a0a2a93 Compare August 13, 2026 18:27
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.

PostgreSQL default image (bitnamilegacy/postgresql) will never receive security patches

1 participant