summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml')
-rw-r--r--vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml b/vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml
new file mode 100644
index 00000000..ea2b81b6
--- /dev/null
+++ b/vnfs/DAaaS/deploy/collection/charts/prometheus/templates/servicemonitor.yaml
@@ -0,0 +1,30 @@
+{{- if .Values.prometheus.additionalServiceMonitors }}
+apiVersion: v1
+kind: List
+items:
+{{- range .Values.prometheus.additionalServiceMonitors }}
+ - apiVersion: "monitoring.coreos.com/v1"
+ kind: ServiceMonitor
+ metadata:
+ name: {{ .name }}
+ "helm.sh/hook": post-install
+ "helm.sh/hook-weight": "1"
+ labels:
+ app: {{ template "prometheus.name" $ }}-prometheus
+{{ include "prometheus.labels" $ | indent 8 }}
+ {{- if .additionalLabels }}
+{{ toYaml .additionalLabels | indent 8 }}
+ {{- end }}
+ spec:
+ endpoints:
+{{ toYaml .endpoints | indent 8 }}
+ {{- if .jobLabel }}
+ jobLabel: {{ .jobLabel }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ $.Release.Namespace | quote }}
+ selector:
+{{ toYaml .selector | indent 8 }} release: {{ $.Release.Name | quote }}
+{{- end }}
+{{- end }}