-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
controller: add pv secret annotation support to forget SC #713
Conversation
@humblec I've created unit tests for this PR mkimuram@f0b88ab on top of this PR's commit. Please check it. |
@mkimuram Thats cool!. I have added your commit on top of this PR 👍 , lets see how it goes! |
/assign @jsafrane |
prefixedProvisionerSecretNameKey: "provisionersecret", | ||
prefixedProvisionerSecretNamespaceKey: defaultSecretNsName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a different key-value par than getDefaultProvisinerSecrets()
to see where the final secret comes from. This applies to all tests below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane Thank you for your review.
Non-empty provisioner secret is set as PV annotation and modified StorageClass exists
and Non-existent provisioner secret is set as PV annotation
already checks where the final secret comes from.
Former one has invalid secret specified in the StorageClass and verifies that the right secret is taken from annotations (we may still need to discuss if it should be the expected behavior as commented here).
Latter one has invalid secret specified in the annotations and verifies that it fails to get the secret.
However, we may be able to improve getDefaultProvisinerSecrets()
to prepare two secrets and check that either of the expected secret is set, to make it clear.
(Also, getDefaultProvisinerSecrets()
should be renamed to something like getProvisinerSecretCandidates()
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsafrane could you please confirm/share your thought on above , so that the unit test can also be adjusted..
150cb7d
to
6fcffe1
Compare
Signed-off-by: Humble Chirammal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, just one question for the provision changes
Signed-off-by: Humble Chirammal <[email protected]>
@jsafrane all comments except #713 (comment) has been addressed. ptal.. thanks ! |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: humblec, jsafrane The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Humble Chirammal [email protected]
Special notes for your reviewer:
-->