Skip to content

Fix Issue 227: Generate new PostgreSQL password for role after restoration#348

Draft
JevgeniF wants to merge 5 commits intocrossplane-contrib:masterfrom
JevgeniF:issue-227-generate-new-postgreSQL-password-for-role-after-restoration
Draft

Fix Issue 227: Generate new PostgreSQL password for role after restoration#348
JevgeniF wants to merge 5 commits intocrossplane-contrib:masterfrom
JevgeniF:issue-227-generate-new-postgreSQL-password-for-role-after-restoration

Conversation

@JevgeniF
Copy link
Copy Markdown

@JevgeniF JevgeniF commented Mar 23, 2026

Description of your changes

Fixes #227: The change adds an optional boolean field, passwordReset, to the Role spec. This field changes how the provider behaves when it encounters an empty Secret resource after a restoration:

If passwordReset is true and the Secret is empty, the provider generates a new password for the role and populates the Secret.

If passwordReset is false or omitted, the provider acts as usual and leaves the role's password unchanged (meaning the Secret may simply stay empty).

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

Unit tests written to test passwordResetToken work.
Manual test in AWS cluster.

A test linux_amd64 package for you reference can be found in Docker Hub:
docker pull entigolabs/provider-sql:test
Package digest: sha256:6b41c2bc13fc23ecd13f9461d3beeb3d38af3990c6d3c1b75167ad0260382d05

…ange

Signed-off-by: Jevgeni Fenko <jevgeni.fenko@gmail.com>
… prevents unwanted generation due to any spec change.

Signed-off-by: Jevgeni Fenko <jevgeni.fenko@gmail.com>
Signed-off-by: Jevgeni Fenko <jevgeni.fenko@gmail.com>
…postgreSQL-password-for-role-after-restoration
@JevgeniF JevgeniF force-pushed the issue-227-generate-new-postgreSQL-password-for-role-after-restoration branch 2 times, most recently from 9879996 to 223b9ed Compare March 26, 2026 11:03
…abases and roles restoration

Signed-off-by: Jevgeni Fenko <jevgeni.fenko@gmail.com>
@JevgeniF JevgeniF force-pushed the issue-227-generate-new-postgreSQL-password-for-role-after-restoration branch from 223b9ed to 0d91262 Compare March 26, 2026 11:22
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.

Generate a new PostgreSQL password for roles in case of restoration

1 participant