github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-node-exporter/templates/servicemonitor.yaml (about)

     1  {{- if .Values.prometheus.monitor.enabled }}
     2  apiVersion: {{ .Values.prometheus.monitor.apiVersion | default "monitoring.coreos.com/v1" }}
     3  kind: ServiceMonitor
     4  metadata:
     5    name: {{ include "prometheus-node-exporter.fullname" . }}
     6    namespace: {{ include "prometheus-node-exporter.monitor-namespace" . }}
     7    labels:
     8      {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
     9      {{- with .Values.prometheus.monitor.additionalLabels }}
    10      {{- toYaml . | nindent 4 }}
    11      {{- end }}
    12  spec:
    13    jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.monitor.jobLabel }}
    14    {{- include "servicemonitor.scrapeLimits" .Values.prometheus.monitor | nindent 2 }}
    15    {{- with .Values.prometheus.monitor.podTargetLabels }}
    16    podTargetLabels:
    17      {{- toYaml . | nindent 4 }}
    18    {{- end }}
    19    selector:
    20      matchLabels:
    21      {{- with .Values.prometheus.monitor.selectorOverride }}
    22        {{- toYaml . | nindent 6 }}
    23      {{- else }}
    24        {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
    25      {{- end }}
    26    {{- with .Values.prometheus.monitor.attachMetadata }}
    27    attachMetadata:
    28      {{- toYaml . | nindent 4 }}
    29    {{- end }}
    30    endpoints:
    31      - port: {{ .Values.service.portName }}
    32        scheme: {{ .Values.prometheus.monitor.scheme }}
    33        {{- with .Values.prometheus.monitor.basicAuth }}
    34        basicAuth:
    35          {{- toYaml . | nindent 8 }}
    36        {{- end }}
    37        {{- with .Values.prometheus.monitor.bearerTokenFile }}
    38        bearerTokenFile: {{ . }}
    39        {{- end }}
    40        {{- with .Values.prometheus.monitor.tlsConfig }}
    41        tlsConfig:
    42          {{- toYaml . | nindent 8 }}
    43        {{- end }}
    44        {{- with .Values.prometheus.monitor.proxyUrl }}
    45        proxyUrl: {{ . }}
    46        {{- end }}
    47        {{- with .Values.prometheus.monitor.interval }}
    48        interval: {{ . }}
    49        {{- end }}
    50        {{- with .Values.prometheus.monitor.scrapeTimeout }}
    51        scrapeTimeout: {{ . }}
    52        {{- end }}
    53        {{- with .Values.prometheus.monitor.relabelings }}
    54        relabelings:
    55          {{- toYaml . | nindent 8 }}
    56        {{- end }}
    57        {{- with .Values.prometheus.monitor.metricRelabelings }}
    58        metricRelabelings:
    59          {{- toYaml . | nindent 8 }}
    60        {{- end }}
    61  {{- end }}