fix(outline): declare the database owner role #707
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/outline-database-role"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #705, found by deploying it.
The failure
The
outlineDatabase CR came upAPPLIED=false:CNPG will not create a database whose
ownerrole is absent, and it reportsthat only in the CR's own status — the Flux Kustomization went
Trueand thedeploy verified, because a Database CR that never applies is not an unhealthy
resource.
The wider gap this exposed
No tenant owner role is declared anywhere in this repository.
tenantdatabase/argo.yamlsays its role is "created bycnpg-instance/arm-cluster.yaml managed.roles" — and that file had nomanagedblock at all, nor does the live cluster.
app,argo,binjovi,binjovi_staging,forgejo,hydra,kratosandn8nall exist in Postgresand none is declared. They were created by the retired Crossplane composition or
by hand, and survive only because nothing has rebuilt this cluster since.
That bears on the north star directly:
make rebuildwith zero manualintervention would not recreate them.
What this does, and what it deliberately does not
Adds
spec.managed.roleswithoutlineonly.passwordSecret,disablePasswordunset. CNPG manages a role'spassword only when given one, so the password stays owned by the
OpenBaoDatabaseStaticRolethat rotates it. Two controllers writing the samefield every reconcile is the failure being avoided.
of every role it is given, so listing a live role is a change to that role, not
a no-op. That wants its own verified pass, not a side effect of onboarding a
wiki. The reasoning is recorded in the manifest.
Guard
tests/outline.shnow reads the owner out of the Database CR and asserts amatching managed role on
postgres-arm— proved red without the fix. Two of itsown pipelines were also fixed after
tests/no-sigpipe-readers.shcaught them(
| head -1and| grep -Fqx, both early-exiting readers underpipefail).108 guards green.
https://claude.ai/code/session_01JGe4pyhQ36AhgDfPJry4d3