-
Notifications
You must be signed in to change notification settings - Fork 176
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
2.0 prep: Revert "Revert "Use patch to replace update"" #177
Conversation
This reverts commit 7c8996b. Use PATCH instead of UPDATE. It should prevent some version conflict errors. In 2.0 we can change the default RBAC policy and add PATCH there.
Work round our imperfect implemetation of PATCH in fake client / informers. It does not store new version of patched VolumeAttachment to VolumeAttachment informer and thus the controller has to repeat some actions.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
@@ -24,7 +24,7 @@ metadata: | |||
rules: | |||
- apiGroups: [""] | |||
resources: ["persistentvolumes"] | |||
verbs: ["get", "list", "watch", "update"] | |||
verbs: ["get", "list", "watch", "update", "patch"] |
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.
Do we still need update?
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.
I'd prefer to have it there, just in case :-)
(btw, I'd prefer if there were just generic "read" and "write" permissions)
/lgtm |
/retest |
/kind cleanup
What this PR does / why we need it:
This PR restores PATCH support in the external attacher. In v2.0 we can change the behavior and also the default RBAC rules that the attacher needs.
Special notes for your reviewer:
The first commit is the same as originally applied by @cwdsuzhou in #149. The second commit openly admits that the fake client / informer is imperfect and enables tests commented out by #149.
I tried to implement the fake PATCH correctly, however, applying
[]byte
patch to existing API object looks impossible.Does this PR introduce a user-facing change?: