Skip to content

feat: Trigger PostgreSQL Role reconciliation when password Secret changes#394

Open
Mirt0x wants to merge 1 commit into
crossplane-contrib:masterfrom
Mirt0x:feat/add_reconcile_loop_on_pw_change
Open

feat: Trigger PostgreSQL Role reconciliation when password Secret changes#394
Mirt0x wants to merge 1 commit into
crossplane-contrib:masterfrom
Mirt0x:feat/add_reconcile_loop_on_pw_change

Conversation

@Mirt0x
Copy link
Copy Markdown

@Mirt0x Mirt0x commented Jun 4, 2026

Description of your changes

  • Added Secret watches to Role controllers so Roles referencing a password Secret are enqueued when that Secret changes. See the namespaced and cluster Role controllers.
  • Extracted the mapping logic into helpers namespacedSecretMapper and clusterSecretMapper that list Roles and return reconcile requests for Roles whose PasswordSecretRef matches the Secret.
  • Added unit tests for the mapper behavior (including tests that exercise Secret-data changes).
  • Ran formatting on modified files.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

  • go test ./pkg/controller/namespaced/postgresql/role ./pkg/controller/cluster/postgresql/role
    both packages passed locally
  • make reviewable

](https://git.io/fj2m9)

Signed-off-by: Lucas Wittchen <lucas.wittchen@gmx.net>
@Mirt0x Mirt0x force-pushed the feat/add_reconcile_loop_on_pw_change branch from 8dcdb2e to 82dbcdf Compare June 4, 2026 07:58
@fernandezcuesta
Copy link
Copy Markdown
Collaborator

Related: #348

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.

2 participants