mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
18 lines
589 B
YAML
18 lines
589 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 .Values.prometheus.namespace . | default "observability" }}
|
|
labels:
|
|
{{- include "template.labels" . | nindent 4 }}
|
|
spec:
|
|
podMetricsEndpoints:
|
|
- port: {{ .Values.application.actuatorPort }}
|
|
path: /actuator/prometheus
|
|
selector:
|
|
{{- include "template.selectorLabels" . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|