pod-volume-cleaner/helm/templates/podmonitor.yaml

30 lines
951 B
YAML
Raw Normal View History

2022-10-11 14:48:46 +00:00
{{- if .Values.podMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "pod-cleaner.fullname" . }}
labels:
{{- include "pod-cleaner.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
2022-10-13 13:17:11 +00:00
{{- include "pod-cleaner.labels" . | nindent 6 }}
2022-10-11 14:48:46 +00:00
podMetricsEndpoints:
- port: {{ include "pod-cleaner.metrics.portName" . | quote }}
path: {{ .Values.podMonitor.path | quote }}
{{- if .Values.podMonitor.tlsConfig }}
scheme: "https"
tlsConfig:
{{- toYaml .Values.podMonitor.tlsConfig | trim | nindent 8 }}
{{- end }}
interval: {{ .Values.podMonitor.interval }}
2022-10-13 13:33:03 +00:00
scrapeTimeout: {{ .Values.podMonitor.scrapeTimeout }}
2022-10-11 14:48:46 +00:00
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- if .Values.podMonitor.additionalLabels }}
jobLabel:
{{- toYaml .Values.podMonitor.additionalLabels | trim | nindent 4 }}
{{- end }}
{{- end }}