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

     1  {{- if .Values.prometheus.podMonitor.enabled }}
     2  apiVersion: {{ .Values.prometheus.podMonitor.apiVersion | default "monitoring.coreos.com/v1" }}
     3  kind: PodMonitor
     4  metadata:
     5    name: {{ include "prometheus-node-exporter.fullname" . }}
     6    namespace: {{ include "prometheus-node-exporter.podmonitor-namespace" . }}
     7    labels:
     8      {{- include "prometheus-node-exporter.labels" . | nindent 4 }}
     9      {{- with .Values.prometheus.podMonitor.additionalLabels }}
    10      {{- toYaml . | nindent 4 }}
    11      {{- end }}
    12  spec:
    13    jobLabel: {{ default "app.kubernetes.io/name" .Values.prometheus.podMonitor.jobLabel }}
    14    {{- include "podmonitor.scrapeLimits" .Values.prometheus.podMonitor | nindent 2 }}
    15    selector:
    16      matchLabels:
    17      {{- with .Values.prometheus.podMonitor.selectorOverride }}
    18        {{- toYaml . | nindent 6 }}
    19      {{- else }}
    20        {{- include "prometheus-node-exporter.selectorLabels" . | nindent 6 }}
    21      {{- end }}
    22    namespaceSelector:
    23      matchNames:
    24        - {{ include "prometheus-node-exporter.namespace" . }}
    25    {{- with .Values.prometheus.podMonitor.attachMetadata }}
    26    attachMetadata:
    27      {{- toYaml . | nindent 4 }}
    28    {{- end }}
    29    {{- with .Values.prometheus.podMonitor.podTargetLabels }}
    30    podTargetLabels:
    31      {{- toYaml . | nindent 4 }}
    32    {{- end }}
    33    podMetricsEndpoints:
    34      - port: {{ .Values.service.portName }}
    35        {{- with .Values.prometheus.podMonitor.scheme }}
    36        scheme: {{ . }}
    37        {{- end }}
    38        {{- with .Values.prometheus.podMonitor.path }}
    39        path: {{ . }}
    40        {{- end }}
    41        {{- with .Values.prometheus.podMonitor.basicAuth }}
    42        basicAuth:
    43          {{- toYaml . | nindent 8 }}
    44        {{- end }}
    45        {{- with .Values.prometheus.podMonitor.bearerTokenSecret }}
    46        bearerTokenSecret:
    47          {{- toYaml . | nindent 8 }}
    48        {{- end }}
    49        {{- with .Values.prometheus.podMonitor.tlsConfig }}
    50        tlsConfig:
    51          {{- toYaml . | nindent 8 }}
    52        {{- end }}
    53        {{- with .Values.prometheus.podMonitor.authorization }}
    54        authorization:
    55          {{- toYaml . | nindent 8 }}
    56        {{- end }}
    57        {{- with .Values.prometheus.podMonitor.oauth2 }}
    58        oauth2:
    59          {{- toYaml . | nindent 8 }}
    60        {{- end }}
    61        {{- with .Values.prometheus.podMonitor.proxyUrl }}
    62        proxyUrl: {{ . }}
    63        {{- end }}
    64        {{- with .Values.prometheus.podMonitor.interval }}
    65        interval: {{ . }}
    66        {{- end }}
    67        {{- with .Values.prometheus.podMonitor.honorTimestamps }}
    68        honorTimestamps: {{ . }}
    69        {{- end }}
    70        {{- with .Values.prometheus.podMonitor.honorLabels }}
    71        honorLabels: {{ . }}
    72        {{- end }}
    73        {{- with .Values.prometheus.podMonitor.scrapeTimeout }}
    74        scrapeTimeout: {{ . }}
    75        {{- end }}
    76        {{- with .Values.prometheus.podMonitor.relabelings }}
    77        relabelings:
    78          {{- toYaml . | nindent 8 }}
    79        {{- end }}
    80        {{- with .Values.prometheus.podMonitor.metricRelabelings }}
    81        metricRelabelings:
    82          {{- toYaml . | nindent 8 }}
    83        {{- end }}
    84        enableHttp2: {{ default false .Values.prometheus.podMonitor.enableHttp2 }}
    85        filterRunning: {{ default true .Values.prometheus.podMonitor.filterRunning }}
    86        followRedirects: {{ default false .Values.prometheus.podMonitor.followRedirects }}
    87        {{- with .Values.prometheus.podMonitor.params }}
    88        params:
    89          {{- toYaml . | nindent 8 }}
    90        {{- end }}
    91  {{- end }}