22 lines
788 B
YAML
22 lines
788 B
YAML
{{- if .Values.prometheus.serviceMonitor.create }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ include "nginx-ingress.controller.fullname" . }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "nginx-ingress.labels" . | nindent 4 }}
|
|
{{- if .Values.prometheus.serviceMonitor.labels -}}
|
|
{{- toYaml .Values.prometheus.serviceMonitor.labels | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- if .Values.prometheus.serviceMonitor.selectorMatchLabels -}}
|
|
{{- toYaml .Values.prometheus.serviceMonitor.selectorMatchLabels | nindent 6 }}
|
|
{{- end }}
|
|
{{- include "nginx-ingress.selectorLabels" . | nindent 6 }}
|
|
endpoints:
|
|
{{- toYaml .Values.prometheus.serviceMonitor.endpoints | nindent 4 }}
|
|
{{- end }}
|