Fix Issue 227: Generate new PostgreSQL password for role after restoration#348
Draft
JevgeniF wants to merge 5 commits intocrossplane-contrib:masterfrom
Conversation
…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
9879996 to
223b9ed
Compare
…abases and roles restoration Signed-off-by: Jevgeni Fenko <jevgeni.fenko@gmail.com>
223b9ed to
0d91262
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
passwordResetis true and the Secret is empty, the provider generates a new password for the role and populates the Secret.If
passwordResetis false or omitted, the provider acts as usual and leaves the role's password unchanged (meaning the Secret may simply stay empty).I have:
make reviewableto 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:testPackage digest:
sha256:6b41c2bc13fc23ecd13f9461d3beeb3d38af3990c6d3c1b75167ad0260382d05