Add support for prometheus
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / prometheus / templates / node-exporter-serviceaccount.yaml
diff --git a/helm/infrastructure/subcharts/prometheus/templates/node-exporter-serviceaccount.yaml b/helm/infrastructure/subcharts/prometheus/templates/node-exporter-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..0cf91af
--- /dev/null
@@ -0,0 +1,11 @@
+{{- if and .Values.nodeExporter.enabled .Values.serviceAccounts.nodeExporter.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    {{- include "prometheus.nodeExporter.labels" . | nindent 4 }}
+  name: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
+{{ include "prometheus.namespace" . | indent 2 }}
+  annotations:
+{{ toYaml .Values.serviceAccounts.nodeExporter.annotations | indent 4 }}
+{{- end -}}