# helm_charts_psp-clusterrolebinding.yaml
{{- if .Values.rbac.pspEnabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: {{ template "external-dns.fullname" . }}-psp
  labels: {{ include "external-dns.labels" . | nindent 4 }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: {{ template "external-dns.fullname" . }}-psp
subjects:
  - kind: ServiceAccount
    name: {{ template "external-dns.fullname" . }}
    namespace: {{ .Release.Namespace }}
{{- end }}