{{- if .Values.rbac.create -}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: {{ template "node-problem-detector.fullname" . }} labels: app.kubernetes.io/name: {{ include "node-problem-detector.name" . }} helm.sh/chart: {{ include "node-problem-detector.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} subjects: - kind: ServiceAccount name: {{ template "node-problem-detector.serviceAccountName" . }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: {{ template "node-problem-detector.fullname" . }} apiGroup: rbac.authorization.k8s.io {{- end -}}