You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 94b4d94
Browse filesBrowse the repository at this point in the historyBrowse files
fix: re-evaluate applied objects after the cluster is demoted (#10871)
Once a Database, Publication, Subscription, or DatabaseRole was
reconciled, the controller exited before the replica gate and never
requeued, so a cluster demoted to a replica kept reporting the stale
primary-side status forever. Re-check the replica condition inside the
already-reconciled exit and watch the Cluster spec so the demotion is
detected promptly.
The recorded reconciliation is kept while the replica condition is
reported, so the object retains ownership of the PostgreSQL entity it
manages and a conflicting object created meanwhile cannot take it over
once the cluster is promoted back; re-application is driven off the
applied status instead. For DatabaseRole the same applies when an inline
managed.roles entry takes over an already-applied role.
This moves the Cluster fetch above the already-reconciled gate, so it
overlaps with #10853 in the test files; whichever lands second needs a
trivial rebase.
Closes#10867
Assisted-by: Claude
Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Armando Ruocco <[email protected]>
Co-authored-by: Armando Ruocco <[email protected]>
(cherry picked from commit 8183cf9)
0 commit comments