github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/thanos-ruler/servicemonitor.yaml (about) 1 {{- if and .Values.thanosRuler.enabled .Values.thanosRuler.serviceMonitor.selfMonitor }} 2 apiVersion: monitoring.coreos.com/v1 3 kind: ServiceMonitor 4 metadata: 5 name: {{ template "kube-prometheus-stack.thanosRuler.name" . }} 6 namespace: {{ template "kube-prometheus-stack.namespace" . }} 7 labels: 8 app: {{ template "kube-prometheus-stack.thanosRuler.name" . }} 9 {{ include "kube-prometheus-stack.labels" . | indent 4 }} 10 {{- with .Values.thanosRuler.serviceMonitor.additionalLabels }} 11 {{- toYaml . | nindent 4 }} 12 {{- end }} 13 spec: 14 {{- include "servicemonitor.scrapeLimits" .Values.thanosRuler.serviceMonitor | nindent 2 }} 15 selector: 16 matchLabels: 17 app: {{ template "kube-prometheus-stack.thanosRuler.name" . }} 18 release: {{ $.Release.Name | quote }} 19 self-monitor: {{ .Values.thanosRuler.serviceMonitor.selfMonitor | quote }} 20 namespaceSelector: 21 matchNames: 22 - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }} 23 endpoints: 24 - port: {{ .Values.thanosRuler.thanosRulerSpec.portName }} 25 {{- if .Values.thanosRuler.serviceMonitor.interval }} 26 interval: {{ .Values.thanosRuler.serviceMonitor.interval }} 27 {{- end }} 28 {{- if .Values.thanosRuler.serviceMonitor.proxyUrl }} 29 proxyUrl: {{ .Values.thanosRuler.serviceMonitor.proxyUrl}} 30 {{- end }} 31 {{- if .Values.thanosRuler.serviceMonitor.scheme }} 32 scheme: {{ .Values.thanosRuler.serviceMonitor.scheme }} 33 {{- end }} 34 {{- if .Values.thanosRuler.serviceMonitor.bearerTokenFile }} 35 bearerTokenFile: {{ .Values.thanosRuler.serviceMonitor.bearerTokenFile }} 36 {{- end }} 37 {{- if .Values.thanosRuler.serviceMonitor.tlsConfig }} 38 tlsConfig: {{ toYaml .Values.thanosRuler.serviceMonitor.tlsConfig | nindent 6 }} 39 {{- end }} 40 path: "{{ trimSuffix "/" .Values.thanosRuler.thanosRulerSpec.routePrefix }}/metrics" 41 {{- if .Values.thanosRuler.serviceMonitor.metricRelabelings }} 42 metricRelabelings: 43 {{ tpl (toYaml .Values.thanosRuler.serviceMonitor.metricRelabelings | indent 6) . }} 44 {{- end }} 45 {{- if .Values.thanosRuler.serviceMonitor.relabelings }} 46 relabelings: 47 {{ toYaml .Values.thanosRuler.serviceMonitor.relabelings | indent 6 }} 48 {{- end }} 49 {{- end }}