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

csi-provisioner rbac need add resources nodes get, list, watch #293

Closed
huaizong opened this issue Mar 29, 2019 · 2 comments
Closed

csi-provisioner rbac need add resources nodes get, list, watch #293

huaizong opened this issue Mar 29, 2019 · 2 comments

Comments

@huaizong
Copy link

I0329 13:28:38.412866       1 event.go:221] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"csi-cephfs-pvc-2", UID:"7863d39c-5226-11e9-9f7e-28d24488ad30", APIVersion:"v1", ResourceVersion:"152377", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to get target node: nodes "nvknode" is forbidden: User "system:serviceaccount:default:cephfs-csi-provisioner" cannot get resource "nodes" in API group "" at the cluster scope

provisioner 1.0 support VolumeNodeAffinity

https://github.com/kubernetes-csi/external-provisioner/blob/release-1.0/pkg/controller/topology.go#L114

		nodeInfo, err := csiAPIClient.CsiV1alpha1().CSINodeInfos().Get(selectedNode.Name, metav1.GetOptions{})

https://github.com/kubernetes-csi/external-provisioner/blob/release-1.0/pkg/controller/topology.go#L148

		nodeInfos, err := csiAPIClient.CsiV1alpha1().CSINodeInfos().List(metav1.ListOptions{})

@rootfs
Copy link
Member

rootfs commented Apr 1, 2019

the offending code is more likely in https://github.com/kubernetes-csi/external-provisioner/blob/release-1.0/pkg/controller/topology.go#L189

	nodes, err := kubeClient.CoreV1().Nodes().List(metav1.ListOptions{LabelSelector: selector})

@huaizong
Copy link
Author

huaizong commented Apr 1, 2019

the offending code is more likely in https://github.com/kubernetes-csi/external-provisioner/blob/release-1.0/pkg/controller/topology.go#L189

	nodes, err := kubeClient.CoreV1().Nodes().List(metav1.ListOptions{LabelSelector: selector})

you are correct,

@rootfs rootfs closed this as completed Apr 1, 2019
ShyamsundarR pushed a commit to ShyamsundarR/ceph-csi that referenced this issue Apr 25, 2019
wilmardo pushed a commit to wilmardo/ceph-csi that referenced this issue Jul 29, 2019
Madhu-1 pushed a commit to Madhu-1/ceph-csi that referenced this issue Jun 20, 2024
Syncing latest changes from upstream devel for ceph-csi
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