github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/prometheus/servicemonitorThanosSidecar.yaml (about)

     1  {{- if and .Values.prometheus.thanosService.enabled .Values.prometheus.thanosServiceMonitor.enabled (eq .Values.prometheus.thanos.integration "sidecar") }}
     2  apiVersion: monitoring.coreos.com/v1
     3  kind: ServiceMonitor
     4  metadata:
     5    name: {{ template "kube-prometheus-stack.fullname" . }}-thanos-sidecar
     6    namespace: {{ template "kube-prometheus-stack.namespace" . }}
     7    labels:
     8      app: {{ template "kube-prometheus-stack.name" . }}-thanos-sidecar
     9  {{ include "kube-prometheus-stack.labels" . | indent 4 }}
    10  {{- with .Values.prometheus.thanosServiceMonitor.additionalLabels }}
    11  {{- toYaml . | nindent 4 }}
    12  {{- end }}
    13  spec:
    14    {{- include "servicemonitor.scrapeLimits" .Values.prometheus.thanosServiceMonitor | nindent 2 }}
    15    selector:
    16      matchLabels:
    17        app: {{ template "kube-prometheus-stack.name" . }}-thanos-discovery
    18        release: {{ $.Release.Name | quote }}
    19    namespaceSelector:
    20      matchNames:
    21        - {{ printf "%s" (include "kube-prometheus-stack.namespace" .) | quote }}
    22    endpoints:
    23    - port: {{ .Values.prometheus.thanosService.httpPortName }}
    24      {{- if .Values.prometheus.thanosServiceMonitor.interval }}
    25      interval: {{ .Values.prometheus.thanosServiceMonitor.interval }}
    26      {{- end }}
    27      {{- if .Values.prometheus.thanosServiceMonitor.scheme }}
    28      scheme: {{ .Values.prometheus.thanosServiceMonitor.scheme }}
    29      {{- end }}
    30      {{- if .Values.prometheus.thanosServiceMonitor.tlsConfig }}
    31      tlsConfig: {{ toYaml .Values.prometheus.thanosServiceMonitor.tlsConfig | nindent 6 }}
    32      {{- end }}
    33      {{- if .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
    34      bearerTokenFile: {{ .Values.prometheus.thanosServiceMonitor.bearerTokenFile }}
    35      {{- end }}
    36      path: "/metrics"
    37  {{- if .Values.prometheus.thanosServiceMonitor.metricRelabelings }}
    38      metricRelabelings:
    39  {{ tpl (toYaml .Values.prometheus.thanosServiceMonitor.metricRelabelings | indent 6) . }}
    40  {{- end }}
    41  {{- if .Values.prometheus.thanosServiceMonitor.relabelings }}
    42      relabelings:
    43  {{ toYaml .Values.prometheus.thanosServiceMonitor.relabelings | indent 6 }}
    44  {{- end }}
    45  {{- end }}