Add support for prometheus
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / prometheus / templates / node-exporter-rolebinding.yaml
1 {{- if and .Values.nodeExporter.enabled .Values.rbac.create }}
2 {{- if .Values.podSecurityPolicy.enabled }}
3 apiVersion: rbac.authorization.k8s.io/v1
4 kind: RoleBinding
5 metadata:
6   name: {{ template "prometheus.nodeExporter.fullname" . }}
7   labels:
8     {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
9 {{ include "prometheus.namespace" . | indent 2 }}
10 roleRef:
11   kind: Role
12   name: {{ template "prometheus.nodeExporter.fullname" . }}
13   apiGroup: rbac.authorization.k8s.io
14 subjects:
15 - kind: ServiceAccount
16   name: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
17 {{ include "prometheus.namespace" . | indent 2 }}
18 {{- end }}
19 {{- end }}