---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: pgo-role
  namespace: $PGO_OPERATOR_NAMESPACE
rules:
  - verbs:
      - '*'
    apiGroups:
      - 'crunchydata.com'
    resources:
      - pgclusters
      - pgpolicies
      - pgtasks
      - pgreplicas
  - verbs:
      - '*'
    apiGroups:
      - 'apps'
    resources:
      - deployments
  - verbs:
      - '*'
    apiGroups:
      - ''
    resources:
      - secrets
      - pods
      - configmaps
      - pods/exec
      - pods/log
      - services
      - replicasets
      - endpoints
      - persistentvolumeclaims
  - verbs:
      - get
      - list
    apiGroups:
      - ''
    resources:
      - storageclasses
  - verbs:
      - '*'
    apiGroups:
      - 'batch'
    resources:
      - jobs
