kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ubiquity-k8s-provisioner
  labels:
    product: ibm-storage-enabler-for-containers
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "create", "delete"]
    # Needed for ubiquity provisioner in order to manage PVs.

  - apiGroups: [""]
    resources: ["persistentvolumeclaims"]
    verbs: ["get", "list", "watch", "update"]
    # Needed for ubiquity provisioner in order to manage PVCs.

  - apiGroups: ["storage.k8s.io"]
    resources: ["storageclasses"]
    verbs: ["get", "list", "watch"]
    # Needed for ubiquity provisioner as part of the provisioning of PVCs.

  - apiGroups: [""]
    resources: ["events"]
    verbs: ["watch", "create", "list", "update", "patch"]
    # Needed for ubiquity provisioner in order to manage PVC events.
