{{- if .Values.podMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: {{ include "push.name" . }} labels: {{- include "push.runtimeLabels" . | nindent 4 }} {{- with .Values.podMonitor.labels }} {{- toYaml . | nindent 4 }} {{- end }} spec: selector: matchLabels: {{- include "push.runtimeLabels" . | nindent 6 }} podMetricsEndpoints: # Scrape the private health port only; /metrics is never on the public Service. - port: health path: /metrics interval: {{ .Values.podMonitor.interval }} scrapeTimeout: {{ .Values.podMonitor.scrapeTimeout }} {{- end }}