{{- if .Values.rbac.create }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ template "rabbitmq.fullname" . }}-endpoint-reader
  labels: {{- include "rabbitmq.labels" . | nindent 4 }}
rules:
  - apiGroups: [""]
    resources: ["endpoints"]
    verbs: ["get"]
#  - apiGroups: [""]
#    resources: ["events"]
#    verbs: ["create"]
{{- end }}