mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
23 lines
771 B
YAML
23 lines
771 B
YAML
{{- define "template.podmonitor" -}}
|
|
{{- if and .Values.prometheus.enabled .Values.prometheus.useCRDs .Values.application.isSpring }}
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: PodMonitor
|
|
metadata:
|
|
name: {{ include "template.fullname" . }}
|
|
namespace: {{ tpl (quote .Values.prometheus.namespace) . | default "observability" }}
|
|
labels:
|
|
{{- include "template.labels" . | nindent 4 }}
|
|
release: {{ .Values.prometheus.releaseName | quote | default "prometheus" }}
|
|
spec:
|
|
podMetricsEndpoints:
|
|
- port: "{{ .Values.application.actuatorPort }}"
|
|
path: /actuator/prometheus
|
|
namespaceSelector:
|
|
matchNames:
|
|
- "{{ .Release.Namespace }}"
|
|
selector:
|
|
matchLabels:
|
|
{{- include "template.selectorLabels" . | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|