|
| 1 | +# This file is part of the Hammerspace CSI Driver project. |
| 2 | +# It defines the RBAC roles and bindings for the CSI provisioner component. |
| 3 | +# The provisioner is responsible for creating and managing PersistentVolumes |
| 4 | +# based on PersistentVolumeClaims in Kubernetes. |
| 5 | +apiVersion: v1 |
| 6 | +kind: ServiceAccount |
| 7 | +metadata: |
| 8 | + name: csi-provisioner |
| 9 | + namespace: {{ .Values.namespace }} |
| 10 | +--- |
| 11 | +# This ClusterRole defines the permissions required by the CSI provisioner. |
| 12 | +# It allows the provisioner to manage PersistentVolumes, PersistentVolumeClaims, |
| 13 | +# and other related resources in the Kubernetes cluster. |
| 14 | +# It also allows the provisioner to interact with storage classes and volume snapshots. |
| 15 | +# The ClusterRole is bound to the csi-provisioner ServiceAccount. |
| 16 | +# This ClusterRoleBinding binds the csi-provisioner ServiceAccount to the csi-provisioner ClusterRole. |
| 17 | +# This allows the provisioner to perform the actions defined in the ClusterRole. |
| 18 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 19 | +# The ClusterRoleBinding is necessary for the provisioner to have the required permissions |
| 20 | +# to manage storage resources in the cluster. |
| 21 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 22 | +# This ClusterRoleBinding is specifically for the provisioner to manage volume attachments. |
| 23 | +# It allows the provisioner to update the status of volume attachments. |
| 24 | +# This is necessary for the provisioner to properly manage the lifecycle of volumes |
| 25 | +# and ensure that they are correctly attached to nodes. |
| 26 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 27 | +# This ClusterRoleBinding is specifically for the provisioner to manage volume attachment status. |
| 28 | +# It allows the provisioner to update the status of volume attachments. |
| 29 | +# This is necessary for the provisioner to properly manage the lifecycle of volumes |
| 30 | +# and ensure that they are correctly attached to nodes. |
| 31 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 32 | +# The ClusterRoleBinding is necessary for the provisioner to have the required permissions |
| 33 | +# to manage storage resources in the cluster. |
| 34 | + |
| 35 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 36 | +kind: ClusterRole |
| 37 | +metadata: |
| 38 | + name: csi-provisioner |
| 39 | +rules: |
| 40 | + - apiGroups: [""] |
| 41 | + resources: ["pods", "persistentvolumes", "persistentvolumeclaims", "nodes", "events", "endpoints", "secrets"] |
| 42 | + verbs: ["list", "watch", "get", "create", "delete", "update", "patch"] |
| 43 | + - apiGroups: ["storage.k8s.io", "snapshot.storage.k8s.io", "apiextensions.k8s.io"] |
| 44 | + resources: ["storageclasses", "volumeattachments", "volumeattachments/status", "volumesnapshotcontents/status", "volumesnapshots", "volumesnapshotcontents", "volumesnapshotclasses", "customresourcedefinitions"] |
| 45 | + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] |
| 46 | +--- |
| 47 | +# This ClusterRoleBinding binds the csi-provisioner ServiceAccount to the csi-provisioner ClusterRole. |
| 48 | +# It allows the provisioner to perform the actions defined in the ClusterRole. |
| 49 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 50 | +# This ClusterRoleBinding is necessary for the provisioner to have the required permissions |
| 51 | +# to manage storage resources in the cluster. |
| 52 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 53 | +# This ClusterRoleBinding is specifically for the provisioner to manage volume attachments. |
| 54 | +# It allows the provisioner to update the status of volume attachments. |
| 55 | +# This is necessary for the provisioner to properly manage the lifecycle of volumes |
| 56 | +# and ensure that they are correctly attached to nodes. |
| 57 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 58 | +# This ClusterRoleBinding is specifically for the provisioner to manage volume attachment status. |
| 59 | +# It allows the provisioner to update the status of volume attachments. |
| 60 | +# This is necessary for the provisioner to properly manage the lifecycle of volumes |
| 61 | +# and ensure that they are correctly attached to nodes. |
| 62 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 63 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 64 | +kind: ClusterRoleBinding |
| 65 | +metadata: |
| 66 | + name: csi-provisioner-binding |
| 67 | +subjects: |
| 68 | + - kind: ServiceAccount |
| 69 | + name: csi-provisioner |
| 70 | + namespace: {{ .Values.namespace }} |
| 71 | +roleRef: |
| 72 | + kind: ClusterRole |
| 73 | + name: csi-provisioner |
| 74 | + apiGroup: rbac.authorization.k8s.io |
| 75 | +--- |
| 76 | +# This ClusterRoleBinding is specifically for the provisioner to manage volume attachment status. |
| 77 | +# It allows the provisioner to update the status of volume attachments. |
| 78 | +# This is necessary for the provisioner to properly manage the lifecycle of volumes |
| 79 | +# and ensure that they are correctly attached to nodes. |
| 80 | +# The ClusterRoleBinding is created in the same namespace as the provisioner ServiceAccount. |
| 81 | +# This ClusterRoleBinding is necessary for the provisioner to have the required permissions |
| 82 | +# to manage storage resources in the cluster. |
| 83 | +apiVersion: rbac.authorization.k8s.io/v1 |
| 84 | +kind: ClusterRoleBinding |
| 85 | +metadata: |
| 86 | + name: csi-provisioner |
| 87 | +subjects: |
| 88 | + - kind: ServiceAccount |
| 89 | + name: csi-provisioner |
| 90 | + namespace: {{ .Values.namespace }} |
| 91 | +roleRef: |
| 92 | + kind: ClusterRole |
| 93 | + name: csi-provisioner |
| 94 | + apiGroup: rbac.authorization.k8s.io |
0 commit comments