Skip to content

Remove the unused admin superuser from the managed PostgreSQL - #56

Merged
vramperez merged 2 commits into
masterfrom
remove-admin-db-user
Nov 13, 2026
Merged

vramperez merged 2 commits into
masterfrom
remove-admin-db-user

Conversation

@vramperez

Copy link
Copy Markdown
Collaborator

The managed PostgreSQL got an admin user with superuser and createdb rights, and its password in a Secret, although nothing connects with it: the trusted issuers list and the credentials config service have their own users, and the operator creates its own postgres superuser. It is no longer created.

The operator does not drop roles removed from the manifest, so an existing cluster keeps admin until it is dropped by hand:

kubectl exec -n <namespace> <cluster>-0 -- psql -U postgres -c 'DROP ROLE admin;'
kubectl delete secret -n <namespace> admin.<cluster>.credentials.postgresql.acid.zalan.do

Tests

  • helm lint and the kubeconform validation of the shared chart lint
  • Render: the postgresql resource has the til and ccs users only

The managed PostgreSQL got an `admin` user with superuser and createdb rights,
and its password in a Secret, although nothing connects with it: the trusted
issuers list and the credentials config service have their own users, and the
operator already creates its `postgres` superuser. It is no longer created.

The operator does not drop roles removed from the manifest, so an existing
cluster keeps `admin` until it is dropped by hand (`DROP ROLE admin;`) and its
Secret `admin.<cluster>.credentials.postgresql.acid.zalan.do` deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vramperez
vramperez merged commit 808cc16 into master Nov 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants