rbac.yaml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. kind: ServiceAccount
  2. apiVersion: v1
  3. metadata:
  4. name: nfs-client-provisioner
  5. namespace: i2
  6. ---
  7. kind: ClusterRole
  8. apiVersion: rbac.authorization.k8s.io/v1
  9. metadata:
  10. name: nfs-client-provisioner-runner
  11. namespace: i2
  12. rules:
  13. - apiGroups: [""]
  14. resources: ["persistentvolumes"]
  15. verbs: ["get", "list", "watch", "create", "delete"]
  16. - apiGroups: [""]
  17. resources: ["persistentvolumeclaims"]
  18. verbs: ["get", "list", "watch", "update"]
  19. - apiGroups: ["storage.k8s.io"]
  20. resources: ["storageclasses"]
  21. verbs: ["get", "list", "watch"]
  22. - apiGroups: [""]
  23. resources: ["events"]
  24. verbs: ["create", "update", "patch"]
  25. ---
  26. kind: ClusterRoleBinding
  27. apiVersion: rbac.authorization.k8s.io/v1
  28. metadata:
  29. name: run-nfs-client-provisioner
  30. namespace: i2
  31. subjects:
  32. - kind: ServiceAccount
  33. name: nfs-client-provisioner
  34. namespace: i2
  35. roleRef:
  36. kind: ClusterRole
  37. name: nfs-client-provisioner-runner
  38. apiGroup: rbac.authorization.k8s.io
  39. ---
  40. kind: Role
  41. apiVersion: rbac.authorization.k8s.io/v1
  42. metadata:
  43. name: leader-locking-nfs-client-provisioner
  44. namespace: i2
  45. rules:
  46. - apiGroups: [""]
  47. resources: ["endpoints"]
  48. verbs: ["get", "list", "watch", "create", "update", "patch"]
  49. ---
  50. kind: RoleBinding
  51. apiVersion: rbac.authorization.k8s.io/v1
  52. metadata:
  53. name: leader-locking-nfs-client-provisioner
  54. namespace: i2
  55. subjects:
  56. - kind: ServiceAccount
  57. name: nfs-client-provisioner
  58. # replace with namespace where provisioner is deployed
  59. namespace: i2
  60. roleRef:
  61. kind: Role
  62. name: leader-locking-nfs-client-provisioner
  63. apiGroup: rbac.authorization.k8s.io