---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: "{{ .Release.Name }}-manager"
rules:
  - apiGroups:
      - certwatch.morimoto.net.br
    resources:
      - certwatchers
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - certwatch.morimoto.net.br
    resources:
      - certwatchers/finalizers
    verbs:
      - update
  - apiGroups:
      - certwatch.morimoto.net.br
    resources:
      - certwatchers/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - secrets/status
    verbs:
      - get

  - apiGroups:
      - batch
    resources:
      - jobs
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch

  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
