Merge "Fix the chartmuseum cannot create dir problem, include release repo credential...
[ric-plt/ric-dep.git] / helm / infrastructure / subcharts / kong / templates / servicemonitor.yaml
1 {{- if and ( .Capabilities.APIVersions.Has "monitoring.coreos.com/v1" ) .Values.serviceMonitor.enabled }}
2 apiVersion: monitoring.coreos.com/v1
3 kind: ServiceMonitor
4 metadata:
5   name: {{ template "kong.fullname" . }}
6   {{- if .Values.serviceMonitor.namespace }}
7   namespace: {{ .Values.serviceMonitor.namespace }}
8   {{- end }}
9   labels:
10     {{- include "kong.metaLabels" . | nindent 4 }}
11   {{- if .Values.serviceMonitor.labels }}
12     {{ toYaml .Values.serviceMonitor.labels | nindent 4 }}
13   {{- end }}
14 spec:
15   endpoints:
16   - targetPort: metrics
17     scheme: http
18     {{- if .Values.serviceMonitor.interval }}
19     interval: {{ .Values.serviceMonitor.interval }}
20     {{- end }}
21   jobLabel: {{ .Release.Name }}
22   namespaceSelector:
23     matchNames:
24     - {{ .Release.Namespace }}
25   selector:
26     matchLabels:
27       {{- include "kong.metaLabels" . | nindent 6 }}
28 {{- end }}