Add Prometheus Service Monitor
This commit is contained in:
parent
905d5a2d09
commit
faecd0aa8d
@ -0,0 +1,20 @@
|
|||||||
|
{{- define "prometheus.servicemonitor" }}
|
||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: prometheus
|
||||||
|
user: {{ .Values.user }}
|
||||||
|
name: {{ .Values.user }}-prometheus-servicemonitor
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- path: /metrics
|
||||||
|
port: web
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Values.user }}-monitoring
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
operated-prometheus: 'true'
|
||||||
|
{{- end }}
|
@ -26,6 +26,7 @@
|
|||||||
{{- if .Values.prometheus.enabled }}
|
{{- if .Values.prometheus.enabled }}
|
||||||
{{- template "prometheus.ingress" . }}
|
{{- template "prometheus.ingress" . }}
|
||||||
{{- template "prometheus.prometheus" . }}
|
{{- template "prometheus.prometheus" . }}
|
||||||
|
{{- template "prometheus.servicemonitor" . }}
|
||||||
{{- template "prometheus.role" . }}
|
{{- template "prometheus.role" . }}
|
||||||
{{- template "prometheus.rolebinding" . }}
|
{{- template "prometheus.rolebinding" . }}
|
||||||
{{- template "prometheus.sa" . }}
|
{{- template "prometheus.sa" . }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user