apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: galera-operator
  namespace: galera
rules:
  - apiGroups:
      - sql.databases
    resources:
      - galeras
      - galerabackups
      - upgradeconfigs
      - upgraderules
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - sql.databases
    resources:
      - galeras/status
      - galeras/finalizers
      - galerabackups/status
      - galerabackups/finalizers
    verbs:
      - "*"
  - apiGroups:
      - ""
    resources:
      - pods
      - pods/exec
      - services
#      - secrets
#      - endpoints
      - persistentvolumeclaims
      - events
#      - configmaps
    verbs:
      - "*"
  - apiGroups:
      - policy
    resources:
      - poddisruptionbudgets
    verbs:
      - "*"
  - apiGroups:
      - ""
    resources:
      - secrets
      - configmaps
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - apps
    resources:
      - controllerrevisions
    verbs:
      - "*"
