{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRole
metadata:
  labels: {{ include "external-dns.labels" . | indent 4 }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
  name: {{ template "external-dns.fullname" . }}
rules:
  - apiGroups:
      - ""
      - extensions
    resources:
      - ingresses
      - services
      - pods
      - nodes
    verbs:
      - get
      - list
      - watch
{{- end -}}
