apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    app: cassandra-operator
    chart: cassandra-operator-1.0.0
    heritage: Helm
    release: cassandra-operator
  name: cassandra-operator
rules:
  - apiGroups:
      - ""
    resources:
      - pods
      - services
      - services/finalizers
      - endpoints
      - persistentvolumeclaims
      - events
      - configmaps
      - secrets
    verbs:
      - '*'
  - apiGroups:
      - apps
    resources:
      - deployments
      - daemonsets
      - replicasets
      - statefulsets
    verbs:
      - '*'
  - apiGroups:
      - monitoring.coreos.com
    resources:
      - servicemonitors
    verbs:
      - get
      - create
  - apiGroups:
      - apps
    resourceNames:
      - cassandra-operator
    resources:
      - deployments/finalizers
    verbs:
      - update
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - get
  - apiGroups:
      - apps
    resources:
      - replicasets
    verbs:
      - get
  - apiGroups:
      - cassandraoperator.instaclustr.com
    resources:
      - '*'
      - cassandraclusters
      - cassandrabackups
    verbs:
      - '*'
  - apiGroups:
      - policy
    resourceNames:
      - cassandra-operator
    resources:
      - podsecuritypolicies
    verbs:
      - use