apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: vitess-operator
rules:
- apiGroups:
  - ""
  resources:
  - pods
  - services
  - endpoints
  - persistentvolumeclaims
  - events
  - configmaps
  - secrets
  verbs:
  - '*'
- apiGroups:
  - ""
  resources:
  - namespaces
  verbs:
  - get
- apiGroups:
  - apps
  resources:
  - deployments
  - daemonsets
  - replicasets
  - statefulsets
  verbs:
  - '*'
- apiGroups:
  - policy
  resources:
  - poddisruptionbudgets
  verbs:
  - '*'
- apiGroups:
  - apps
  resourceNames:
  - vitess-operator
  resources:
  - deployments/finalizers
  verbs:
  - update
- apiGroups:
  - planetscale.com
  resources:
  - vitessclusters
  - vitessclusters/status
  - vitessclusters/finalizers
  - vitesscells
  - vitesscells/status
  - vitesscells/finalizers
  - vitesskeyspaces
  - vitesskeyspaces/status
  - vitesskeyspaces/finalizers
  - vitessshards
  - vitessshards/status
  - vitessshards/finalizers
  - etcdlockservers
  - etcdlockservers/status
  - etcdlockservers/finalizers
  - vitessbackups
  - vitessbackups/status
  - vitessbackups/finalizers
  - vitessbackupstorages
  - vitessbackupstorages/status
  - vitessbackupstorages/finalizers
  verbs:
  - '*'