Merge "Update A1 Mediator version to 2.1.9"
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / prometheus / templates / node-exporter-role.yaml
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
4 kind: Role
5 metadata:
6   name: {{ template "prometheus.nodeExporter.fullname" . }}
7   labels:
8     {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
9 {{ include "prometheus.namespace" . | indent 2 }}
10 rules:
11 - apiGroups: ['extensions']
12   resources: ['podsecuritypolicies']
13   verbs:     ['use']
14   resourceNames:
15   - {{ template "prometheus.nodeExporter.fullname" . }}
16 {{- end }}
17 {{- end }}