1 {{- if and .Values.nodeExporter.enabled .Values.rbac.create }}
2 {{- if .Values.podSecurityPolicy.enabled }}
3 apiVersion: rbac.authorization.k8s.io/v1
6 name: {{ template "prometheus.nodeExporter.fullname" . }}
8 {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
9 {{ include "prometheus.namespace" . | indent 2 }}
12 name: {{ template "prometheus.nodeExporter.fullname" . }}
13 apiGroup: rbac.authorization.k8s.io
15 - kind: ServiceAccount
16 name: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
17 {{ include "prometheus.namespace" . | indent 2 }}