{{- if .Values.podMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: buildermgr-monitor {{- if .Values.podMonitor.namespace }} namespace: {{ .Values.podMonitor.namespace }} {{- end }} {{- with .Values.podMonitor.additionalPodMonitorLabels }} labels: {{- toYaml . | nindent 4 }} {{- end }} spec: namespaceSelector: matchNames: - {{ .Release.Namespace }} selector: matchLabels: svc: buildermgr podMetricsEndpoints: - port: "metrics" path: "/metrics" {{- end -}}