Skip to content
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

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

carlory
Copy link
Member

@carlory carlory commented Mar 13, 2024

See kubernetes-csi/external-provisioner#1155 (comment)

/cc @deepakkinni @xing-yang @msau42

Action required: Using patch to update finalizers. Any external-provisioner now needs permission rules to patch PersistentVolumes. Please update RBAC rules of your provisioner.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 13, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 13, 2024
@carlory carlory marked this pull request as ready for review March 13, 2024 04:11
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 13, 2024
@carlory
Copy link
Member Author

carlory commented Mar 13, 2024

/test pull-sig-storage-lib-external-provisioner-unit

@xing-yang
Copy link

/assign @jsafrane

}
return newVolume, nil
return ctrl.client.CoreV1().PersistentVolumes().Patch(ctx, volume.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{})

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deepakkinni done.

@carlory
Copy link
Member Author

carlory commented Mar 15, 2024

A flaking test on TestTopologyParams will be fixed by #165

@carlory
Copy link
Member Author

carlory commented Mar 15, 2024

I'm looking at another flaking test.

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_sig-storage-lib-external-provisioner/164/pull-sig-storage-lib-external-provisioner-unit/1768450559246864384

fatal error: concurrent map read and map write

It shouldn't relate to changes made by this PR. @deepakkinni

@carlory
Copy link
Member Author

carlory commented Mar 15, 2024

/test pull-sig-storage-lib-external-provisioner-unit

@xing-yang
Copy link

/lgtm

@jsafrane any concerns switching from update to patch?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 28, 2024
@jsafrane
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 23, 2024
@jsafrane
Copy link
Contributor

/lgtm cancel

Please update examples/hostpath-provisioner/rbac.yaml with the new permissions.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 23, 2024
@carlory
Copy link
Member Author

carlory commented Apr 23, 2024

@jsafrane added.

@jsafrane
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 23, 2024
@k8s-ci-robot k8s-ci-robot merged commit ea3e5f9 into kubernetes-sigs:master Apr 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants