2020-04-20 15:47:39 +00:00
|
|
|
kind: ServiceAccount
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: vsphere-csi-controller
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: vsphere-csi-controller-role
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
2022-04-04 08:08:11 +00:00
|
|
|
resources: ["nodes", "pods", "configmaps"]
|
2020-04-20 15:47:39 +00:00
|
|
|
verbs: ["get", "list", "watch"]
|
2022-04-04 08:08:11 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
2021-05-04 07:05:11 +00:00
|
|
|
{% if external_vsphere_version >= "7.0" %}
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims/status"]
|
|
|
|
{% if external_vsphere_version >= "7.0u1" %}
|
|
|
|
verbs: ["patch"]
|
|
|
|
{% else %}
|
|
|
|
verbs: ["update", "patch"]
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2020-04-20 15:47:39 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumes"]
|
2021-05-04 07:05:11 +00:00
|
|
|
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
|
2020-04-20 15:47:39 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
2021-05-04 07:05:11 +00:00
|
|
|
{% if vsphere_csi_controller is version('v2.0.0', '>=') %}
|
|
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
|
|
resources: ["leases"]
|
|
|
|
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
|
|
|
{% endif %}
|
2020-04-20 15:47:39 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
2021-05-04 07:05:11 +00:00
|
|
|
resources: ["storageclasses","csinodes"]
|
2020-04-20 15:47:39 +00:00
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["volumeattachments"]
|
2022-04-22 07:04:13 +00:00
|
|
|
verbs: ["get", "list", "watch", "patch", "update"]
|
2021-12-10 19:07:23 +00:00
|
|
|
- apiGroups: ["cns.vmware.com"]
|
|
|
|
resources: ["triggercsifullsyncs"]
|
|
|
|
verbs: ["create", "get", "update", "watch", "list"]
|
2021-05-04 07:05:11 +00:00
|
|
|
- apiGroups: ["cns.vmware.com"]
|
|
|
|
resources: ["cnsvspherevolumemigrations"]
|
|
|
|
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
|
|
|
- apiGroups: ["apiextensions.k8s.io"]
|
|
|
|
resources: ["customresourcedefinitions"]
|
2021-12-10 19:07:23 +00:00
|
|
|
verbs: ["get", "create", "update"]
|
|
|
|
- apiGroups: ["cns.vmware.com"]
|
|
|
|
resources: ["cnsvolumeoperationrequests"]
|
|
|
|
verbs: ["create", "get", "list", "update", "delete"]
|
|
|
|
- apiGroups: [ "cns.vmware.com" ]
|
|
|
|
resources: [ "csinodetopologies" ]
|
|
|
|
verbs: ["get", "update", "watch", "list"]
|
2021-05-04 07:05:11 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["volumeattachments/status"]
|
|
|
|
verbs: ["patch"]
|
2021-12-10 19:07:23 +00:00
|
|
|
- apiGroups: [ "snapshot.storage.k8s.io" ]
|
|
|
|
resources: [ "volumesnapshots" ]
|
|
|
|
verbs: [ "get", "list" ]
|
|
|
|
- apiGroups: [ "snapshot.storage.k8s.io" ]
|
|
|
|
resources: [ "volumesnapshotclasses" ]
|
|
|
|
verbs: [ "watch", "get", "list" ]
|
|
|
|
- apiGroups: [ "snapshot.storage.k8s.io" ]
|
|
|
|
resources: [ "volumesnapshotcontents" ]
|
2022-04-04 08:08:11 +00:00
|
|
|
verbs: [ "create", "get", "list", "watch", "update", "delete", "patch" ]
|
2021-12-10 19:07:23 +00:00
|
|
|
- apiGroups: [ "snapshot.storage.k8s.io" ]
|
|
|
|
resources: [ "volumesnapshotcontents/status" ]
|
|
|
|
verbs: [ "update", "patch" ]
|
2020-04-20 15:47:39 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: vsphere-csi-controller-binding
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: vsphere-csi-controller
|
|
|
|
namespace: kube-system
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: vsphere-csi-controller-role
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|