apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: mariadb-operator
rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - watch
  - apiGroups:
      - ""
    resources:
      - events
      - secrets
      - serviceaccounts
      - services
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - ""
    resources:
      - persistentvolumeclaims
    verbs:
      - create
      - delete
      - deletecollection
      - list
      - patch
      - watch
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - delete
      - get
      - list
      - patch
      - watch
  - apiGroups:
      - ""
    resources:
      - pods/log
    verbs:
      - get
  - apiGroups:
      - apps
    resources:
      - deployments
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - apps
    resources:
      - statefulsets
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - watch
  - apiGroups:
      - authentication.k8s.io
    resources:
      - tokenreviews
    verbs:
      - create
  - apiGroups:
      - authorization.k8s.io
    resources:
      - subjectaccessreviews
    verbs:
      - create
  - apiGroups:
      - batch
    resources:
      - cronjobs
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - batch
    resources:
      - jobs
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - watch
  - apiGroups:
      - cert-manager.io
    resources:
      - certificates
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - discovery.k8s.io
    resources:
      - endpointslices
      - endpointslices/restricted
    verbs:
      - create
      - get
      - list
      - patch
      - watch
  - apiGroups:
      - events.k8s.io
    resources:
      - events
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - k8s.mariadb.com
    resources:
      - backups
      - connections
      - databases
      - externalmariadbs
      - grants
      - mariadbs
      - maxscales
      - physicalbackups
      - restores
      - sqljobs
      - users
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - k8s.mariadb.com
    resources:
      - backups/finalizers
      - connections/finalizers
      - databases/finalizers
      - externalmariadbs/finalizers
      - grants/finalizers
      - mariadbs/finalizers
      - maxscales/finalizers
      - physicalbackups/finalizers
      - restores/finalizers
      - sqljobs/finalizers
      - users/finalizers
    verbs:
      - update
  - apiGroups:
      - k8s.mariadb.com
    resources:
      - backups/status
      - connections/status
      - databases/status
      - externalmariadbs/status
      - grants/status
      - mariadbs/status
      - maxscales/status
      - physicalbackups/status
      - pointintimerecoveries/status
      - restores/status
      - sqljobs/status
      - users/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - k8s.mariadb.com
    resources:
      - maxscale
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - k8s.mariadb.com
    resources:
      - pointintimerecoveries
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - monitoring.coreos.com
    resources:
      - servicemonitors
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - policy
    resources:
      - poddisruptionbudgets
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - rbac.authorization.k8s.io
    resources:
      - clusterrolebindings
      - rolebindings
      - roles
    verbs:
      - create
      - list
      - patch
      - watch
  - apiGroups:
      - snapshot.storage.k8s.io
    resources:
      - volumesnapshots
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - watch
