2019-11-01 07:59:24 +00:00
|
|
|
# This YAML defines all API objects to create RBAC roles for csi node plugin.
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: csi-cinder-node-sa
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-nodeplugin-role
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
2020-09-03 11:01:43 +00:00
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotcontents"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotcontents/status"]
|
|
|
|
verbs: ["update"]
|
2019-11-01 07:59:24 +00:00
|
|
|
---
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: csi-nodeplugin-binding
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: csi-cinder-node-sa
|
|
|
|
namespace: kube-system
|
|
|
|
roleRef:
|
|
|
|
kind: ClusterRole
|
|
|
|
name: csi-nodeplugin-role
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|