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

fix: add pv patch permission with HonorPVReclaimPolicy enabled #725

Merged

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Jul 29, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:
fix: add pv patch permission with HonorPVReclaimPolicy enabled, this PR fixes following error:

E0724 06:58:35.690387       1 controller.go:1025] error syncing volume "pvc-a8f4852f-70b2-4f48-ae2f-6c81862dda2a": persistentvolumes "pvc-a8f4852f-70b2-4f48-ae2f-6c81862dda2a" is forbidden: User "system:serviceaccount:kube-system:csi-nfs-controller-sa" cannot patch resource "persistentvolumes" in API group "" at the cluster scope
I0724 06:58:35.967933       1 controller.go:1599] "Failed to remove finalizer for persistentvolume" PV="pvc-a4b2a0da-2664-4336-b5e7-6e2271e21f8a" err="persistentvolumes \"pvc-a4b2a0da-2664-4336-b5e7-6e2271e21f8a\" is forbidden: User \"system:serviceaccount:kube-system:csi-nfs-controller-sa\" cannot patch resource \"persistentvolumes\" in API group \"\" at the cluster scope"
I0724 06:58:35.967978       1 controller.go:1007] "Retrying syncing volume" key="pvc-a4b2a0da-2664-4336-b5e7-6e2271e21f8a" failures=10
E0724 06:58:35.968014       1 controller.go:1025] error syncing volume "pvc-a4b2a0da-2664-4336-b5e7-6e2271e21f8a": persistentvolumes "pvc-a4b2a0da-2664-4336-b5e7-6e2271e21f8a" is forbidden: User "system:serviceaccount:kube-system:csi-nfs-controller-sa" cannot patch resource "persistentvolumes" in API group "" at the cluster scope

related to kubernetes-csi/external-provisioner#1155

Which issue(s) this PR fixes:

Fixes #721

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix: add pv patch permission with HonorPVReclaimPolicy enabled

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 29, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 Jul 29, 2024
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 29, 2024
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 29, 2024
@coveralls
Copy link

coveralls commented Jul 29, 2024

Pull Request Test Coverage Report for Build 10141323974

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.793%

Totals Coverage Status
Change from base Build 10138324609: 0.0%
Covered Lines: 888
Relevant Lines: 1127

💛 - Coveralls

@andyzhangx andyzhangx merged commit e4a53ae into kubernetes-csi:master Jul 29, 2024
17 of 18 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. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PV stuck in status "Terminating" after deleting corresponding PVC
3 participants