You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

  1. # This YAML defines all API objects to create RBAC roles for csi node plugin.
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. metadata:
  5. name: csi-cinder-node-sa
  6. namespace: kube-system
  7. ---
  8. kind: ClusterRole
  9. apiVersion: rbac.authorization.k8s.io/v1
  10. metadata:
  11. name: csi-nodeplugin-role
  12. rules:
  13. - apiGroups: [""]
  14. resources: ["events"]
  15. verbs: ["get", "list", "watch", "create", "update", "patch"]
  16. - apiGroups: ["snapshot.storage.k8s.io"]
  17. resources: ["volumesnapshotclasses"]
  18. verbs: ["get", "list", "watch"]
  19. - apiGroups: ["snapshot.storage.k8s.io"]
  20. resources: ["volumesnapshotcontents"]
  21. verbs: ["get", "list", "watch"]
  22. - apiGroups: ["snapshot.storage.k8s.io"]
  23. resources: ["volumesnapshotcontents/status"]
  24. verbs: ["update"]
  25. ---
  26. kind: ClusterRoleBinding
  27. apiVersion: rbac.authorization.k8s.io/v1
  28. metadata:
  29. name: csi-nodeplugin-binding
  30. subjects:
  31. - kind: ServiceAccount
  32. name: csi-cinder-node-sa
  33. namespace: kube-system
  34. roleRef:
  35. kind: ClusterRole
  36. name: csi-nodeplugin-role
  37. apiGroup: rbac.authorization.k8s.io