{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  labels: {{ include "sentry-kubernetes.labels" . | indent 4 }}
  name: {{ template "sentry-kubernetes.fullname" . }}
rules:
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - get
      - list
      - watch
{{- end -}}