github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-pushgateway/templates/servicemonitor.yaml (about) 1 {{- if .Values.serviceMonitor.enabled }} 2 apiVersion: monitoring.coreos.com/v1 3 kind: ServiceMonitor 4 metadata: 5 labels: 6 {{- include "prometheus-pushgateway.defaultLabels" . | nindent 4 }} 7 {{- if .Values.serviceMonitor.additionalLabels }} 8 {{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }} 9 {{- end }} 10 name: {{ include "prometheus-pushgateway.fullname" . }} 11 {{- if .Values.serviceMonitor.namespace }} 12 namespace: {{ .Values.serviceMonitor.namespace }} 13 {{- else }} 14 namespace: {{ template "prometheus-pushgateway.namespace" . }} 15 {{- end }} 16 spec: 17 endpoints: 18 - port: http 19 {{- with .Values.serviceMonitor.interval }} 20 interval: {{ . }} 21 {{- end }} 22 {{- with .Values.serviceMonitor.scheme }} 23 scheme: {{ . }} 24 {{- end }} 25 {{- with .Values.serviceMonitor.bearerTokenFile }} 26 bearerTokenFile: {{ . }} 27 {{- end }} 28 {{- with .Values.serviceMonitor.tlsConfig }} 29 tlsConfig: 30 {{- toYaml .| nindent 6 }} 31 {{- end }} 32 {{- with .Values.serviceMonitor.scrapeTimeout }} 33 scrapeTimeout: {{ . }} 34 {{- end }} 35 path: {{ .Values.serviceMonitor.telemetryPath }} 36 honorLabels: {{ .Values.serviceMonitor.honorLabels }} 37 {{- with .Values.serviceMonitor.metricRelabelings }} 38 metricRelabelings: 39 {{- tpl (toYaml . | nindent 6) $ }} 40 {{- end }} 41 {{- with .Values.serviceMonitor.relabelings }} 42 relabelings: 43 {{- toYaml . | nindent 6 }} 44 {{- end }} 45 namespaceSelector: 46 matchNames: 47 - {{ template "prometheus-pushgateway.namespace" . }} 48 selector: 49 matchLabels: 50 {{- include "prometheus-pushgateway.selectorLabels" . | nindent 6 }} 51 {{- end -}}