k8s-manifests/rds/base/charts/jaeger/templates/query-servicemonitor.yaml

38 lines
1.2 KiB
YAML

{{- if and (.Values.query.enabled) (.Values.query.serviceMonitor.enabled)}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "jaeger.query.name" . }}
{{- if .Values.query.serviceMonitor.namespace }}
namespace: {{ .Values.query.serviceMonitor.namespace }}
{{- else }}
{{- end }}
labels:
{{- include "jaeger.labels" . | nindent 4 }}
app.kubernetes.io/component: query
{{- if .Values.query.serviceMonitor.additionalLabels }}
{{- toYaml .Values.query.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
{{- if .Values.query.serviceMonitor.annotations }}
annotations:
{{- toYaml .Values.query.serviceMonitor.annotations | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: admin
path: /metrics
{{- if .Values.query.serviceMonitor.interval }}
interval: {{ .Values.query.serviceMonitor.interval }}
{{- end }}
{{- if .Values.query.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.query.serviceMonitor.scrapeTimeout }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
app.kubernetes.io/component: query
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}