Add servicemonitor additional labels and podmonitor (#2541)

Co-authored-by: shaunak_deshmukh <shaunak@infracloud.io>
This commit is contained in:
Shaunak Deshmukh
2022-09-12 20:25:17 +05:30
committed by GitHub
co-authored by shaunak_deshmukh
parent 05130949ad
commit 79b41ec070
8 changed files with 88 additions and 1 deletions
@@ -0,0 +1,23 @@
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: buildermgr-monitor
{{- if .Values.podMonitor.namespace }}
namespace: {{ .Values.podMonitor.namespace }}
{{- end }}
{{- with .Values.podMonitor.additionalPodMonitorLabels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
svc: buildermgr
podMetricsEndpoints:
- port: "metrics"
path: "/metrics"
{{- end -}}