1 {{- if and .Values.nodeExporter.enabled .Values.rbac.create }}
2 {{- if or (default .Values.nodeExporter.podSecurityPolicy.enabled false) (.Values.podSecurityPolicy.enabled) }}
3 apiVersion: rbac.authorization.k8s.io/v1beta1
6 name: {{ template "prometheus.nodeExporter.fullname" . }}
8 {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
9 {{ include "prometheus.namespace" . | indent 2 }}
11 - apiGroups: ['extensions']
12 resources: ['podsecuritypolicies']
15 - {{ template "prometheus.nodeExporter.fullname" . }}