{{- if .Values.rbac.create -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ include "extendeddaemonset.fullname" . }}
  labels:
{{ include "extendeddaemonset.labels" . | indent 4 }}
subjects:
- kind: ServiceAccount
  namespace: {{ .Release.Namespace }}
  name: {{ template "extendeddaemonset.serviceAccountName" . }}
roleRef:
  kind: ClusterRole
  name: {{ include "extendeddaemonset.fullname" . }}
  apiGroup: rbac.authorization.k8s.io
{{- end -}}
