{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: {{ template "hazelcast.fullname" . }}
  labels:
    app: {{ template "hazelcast.name" . }}
    chart: {{ template "hazelcast.chart" . }}
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
rules:
- apiGroups:
  - ""
  resources:
  - endpoints
  verbs:
  - get
  - list
{{- end -}}
