mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 11:47:47 +03:00
Add suport of Vsphere CSI driver 2.X versions (#7480)
This commit is contained in:
@@ -10,23 +10,47 @@ metadata:
|
||||
name: vsphere-csi-controller-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims", "pods"]
|
||||
resources: ["nodes", "persistentvolumeclaims", "pods", "configmaps"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
{% if external_vsphere_version >= "7.0" %}
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
{% if external_vsphere_version >= "7.0u1" %}
|
||||
verbs: ["patch"]
|
||||
{% else %}
|
||||
verbs: ["update", "patch"]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "delete"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
{% if vsphere_csi_controller is version('v2.0.0', '>=') %}
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
{% endif %}
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["csinodes"]
|
||||
resources: ["storageclasses","csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "update"]
|
||||
verbs: ["get", "list", "watch", "patch"]
|
||||
{% if external_vsphere_version >= "7.0u1" %}
|
||||
- apiGroups: ["cns.vmware.com"]
|
||||
resources: ["cnsvspherevolumemigrations"]
|
||||
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["get", "create"]
|
||||
{% endif %}
|
||||
{% if vsphere_csi_controller is version('v2.0.0', '>=') %}
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments/status"]
|
||||
verbs: ["patch"]
|
||||
{% endif %}
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
||||
Reference in New Issue
Block a user