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

about external-resizer #15

Closed
lijhnihaoa opened this issue Sep 27, 2022 · 5 comments
Closed

about external-resizer #15

lijhnihaoa opened this issue Sep 27, 2022 · 5 comments

Comments

@lijhnihaoa
Copy link

I want to add the volume expansion function on this basis, but after adding the v1.4.0 version of external-resizer, I found that
updatedPVC, err := ctrl.patchClaim(pvc, newPVC, true /* addResourceVersionCheck */) This function reports an error, the reason for the error Error syncing PVC: marking pvc "kube-csi/volume-pvc" as resizing failed: can' t patch status of PVC kube-csi/volume-pvc with persistentvolumeclaims "volume-pvc" is forbidden, I judge that the version may be too high and not suitable, may I ask is this the reason?

@lijhnihaoa
Copy link
Author

updatedClaim, updateErr := ctrl.kubeClient.CoreV1().PersistentVolumeClaims(oldPVC.Namespace). Patch(context.TODO(), oldPVC.Name, types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, "status") if updateErr != nil { return oldPVC, fmt.Errorf("can't patch status of PVC %s with %v", util.PVCKey(oldPVC), updateErr) }

@lijhnihaoa
Copy link
Author

the reason for the error Error syncing PVC: marking pvc "kube-csi/volume-pvc" as resizing failed: can't patch status of PVC kube-csi/volume-pvc with persistentvolumeclaims "volume-pvc" is forbidden: User "system:serviceaccount:kube-csi:spdkcsi-controller-sa" cannot patch resource "persistentvolumeclaims/status" in API group "" in the namespace "kube-csi"

@cyb70289
Copy link
Contributor

Not familiar with external-resize buut this looks like rbac configuration issue. We might need additional cluster roles such as persistentvolumeclaims/status.
You can compare below code with external-resizer document for possible missing roles.
https://github.com/spdk/spdk-csi/blob/master/deploy/kubernetes/controller-rbac.yaml

@lijhnihaoa
Copy link
Author

You reminded me, thanks for giving me direction to think.

@cyb70289
Copy link
Contributor

@lijhnihaoa It will be great if you want to upstream new features to spdk-csi project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants