kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: objectstorage-provisioner-role
  labels:
    app.kubernetes.io/part-of: container-object-storage-interface
    app.kubernetes.io/component: driver-ceph
    app.kubernetes.io/name: cosi-driver-ceph
rules:
  - apiGroups: ["objectstorage.k8s.io"]
    resources: ["buckets", "bucketaccesses", "bucketclaims", "bucketaccessclasses", "buckets/status", "bucketaccesses/status", "bucketclaims/status", "bucketaccessclasses/status"]
    verbs: ["get", "list", "watch", "update", "create", "delete"]
  - apiGroups: ["coordination.k8s.io"]
    resources: ["leases"]
    verbs: ["get", "watch", "list", "delete", "update", "create"]
  - apiGroups: [""]
    resources: ["secrets", "events"]
    verbs: ["get", "delete", "update", "create"]
  - apiGroups: ["events.k8s.io"]
    resources: ["events"]
    verbs: ["create", "patch", "update"]
