-
Notifications
You must be signed in to change notification settings - Fork 173
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
use patch method instead when update finalizer to PV #164
Conversation
Skipping CI for Draft Pull Request. |
f028e1d
to
80b42ce
Compare
80b42ce
to
7923306
Compare
7923306
to
6c6736b
Compare
/test pull-sig-storage-lib-external-provisioner-unit |
/assign @jsafrane |
controller/controller.go
Outdated
} | ||
return newVolume, nil | ||
return ctrl.client.CoreV1().PersistentVolumes().Patch(ctx, volume.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}) |
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.
capture and return results instead of directly making it a part of return. Something like:
pv, err := ctrl.client.CoreV1().PersistentVolumes().Patch(ctx, volume.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{})
if err != nil {
return nil, err
}
return pv
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.
@deepakkinni done.
6c6736b
to
68651d3
Compare
A flaking test on TestTopologyParams will be fixed by #165 |
I'm looking at another flaking test.
It shouldn't relate to changes made by this PR. @deepakkinni |
/test pull-sig-storage-lib-external-provisioner-unit |
/lgtm @jsafrane any concerns switching from update to patch? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carlory, 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 |
/lgtm cancel Please update examples/hostpath-provisioner/rbac.yaml with the new permissions. |
68651d3
to
75eadc2
Compare
@jsafrane added. |
/lgtm |
See kubernetes-csi/external-provisioner#1155 (comment)
/cc @deepakkinni @xing-yang @msau42