apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: percona-xtradb-cluster-operator
rules:
  - apiGroups:
      - pxc.percona.com
    resources:
      - perconaxtradbclusters
      - perconaxtradbclusters/status
      - perconaxtradbclusterbackups
      - perconaxtradbclusterbackups/status
      - perconaxtradbclusterrestores
      - perconaxtradbclusterrestores/status
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - admissionregistration.k8s.io
    resources:
      - validatingwebhookconfigurations
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - pods
      - pods/exec
      - pods/log
      - configmaps
      - services
      - persistentvolumeclaims
      - secrets
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - apps
    resources:
      - deployments
      - replicasets
      - statefulsets
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - batch
    resources:
      - jobs
      - cronjobs
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - policy
    resources:
      - poddisruptionbudgets
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - certmanager.k8s.io
      - cert-manager.io
    resources:
      - issuers
      - certificates
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
      - deletecollection
