github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/dex/templates/servicemonitor.yaml (about)

     1  {{- if .Values.serviceMonitor.enabled }}
     2  apiVersion: monitoring.coreos.com/v1
     3  kind: ServiceMonitor
     4  metadata:
     5    {{- with .Values.serviceMonitor.annotations }}
     6    annotations:
     7      {{- toYaml . | nindent 4 }}
     8    {{- end }}
     9    name: {{ include "dex.fullname" . }}
    10    {{- with .Values.serviceMonitor.namespace }}
    11    namespace: {{ . }}
    12    {{- end }}
    13    labels:
    14      {{- include "dex.labels" . | nindent 4 }}
    15      {{- with .Values.serviceMonitor.labels }}
    16      {{- toYaml . | nindent 4 }}
    17      {{- end }}
    18  spec:
    19    endpoints:
    20      - port: telemetry
    21        {{- with .Values.serviceMonitor.interval }}
    22        interval: {{ . }}
    23        {{- end }}
    24        {{- with .Values.serviceMonitor.scheme }}
    25        scheme: {{ . }}
    26        {{- end }}
    27        {{- with .Values.serviceMonitor.bearerTokenFile }}
    28        bearerTokenFile: {{ . }}
    29        {{- end }}
    30        {{- with .Values.serviceMonitor.tlsConfig }}
    31        tlsConfig:
    32          {{- toYaml .| nindent 6 }}
    33        {{- end }}
    34        {{- with .Values.serviceMonitor.scrapeTimeout }}
    35        scrapeTimeout: {{ . }}
    36        {{- end }}
    37        path: {{ .Values.serviceMonitor.path }}
    38        honorLabels: {{ .Values.serviceMonitor.honorLabels }}
    39        {{- with .Values.serviceMonitor.metricRelabelings }}
    40        metricRelabelings:
    41          {{- tpl (toYaml . | nindent 6) $ }}
    42        {{- end }}
    43        {{- with .Values.serviceMonitor.relabelings }}
    44        relabelings:
    45          {{- toYaml . | nindent 6 }}
    46        {{- end }}
    47    jobLabel: {{ include "dex.fullname" . }}
    48    selector:
    49      matchLabels:
    50        {{- include "dex.selectorLabels" . | nindent 6 }}
    51    namespaceSelector:
    52      matchNames:
    53        - {{ .Release.Namespace }}
    54  {{- end }}