Skip to content

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

Closed
Mirt0x wants to merge 2 commits into
crossplane-contrib:masterfrom
Mirt0x:feat/add_reconcile_loop_on_pw_change
Closed

Mirt0x wants to merge 2 commits into
crossplane-contrib:masterfrom
Mirt0x:feat/add_reconcile_loop_on_pw_change

Conversation

@Mirt0x

@Mirt0x Mirt0x commented Jun 4, 2026

Copy link
Copy Markdown

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

@Mirt0x

Mirt0x commented Oct 12, 2026

Copy link
Copy Markdown
Author

hey @fernandezcuesta,
I see you opened #470
Should we close this then?

@fernandezcuesta

Copy link
Copy Markdown
Collaborator

Hi @Mirt0x, I didnt realize this one was already here.
If you want, feel free to take what I did in #470 and combine it here (or just cherrypick) and I'll review it.

@Mirt0x

Mirt0x commented Oct 31, 2026

Copy link
Copy Markdown
Author

Hey @fernandezcuesta,
As far as I can tell, what you did in #470 is way more extensive than what I did here so this one adds no functionality. So unless there is a specific aspect you’d like me to have rebased and combined, I’d just go ahead and close my PR. Feel free to comment and I’ll reopen and combine.

@Mirt0x Mirt0x closed this Oct 31, 2026
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