Added prometheus support to template

This commit is contained in:
2023-11-02 00:02:27 +01:00
parent 87e75150e7
commit 41ceac6d57
3 changed files with 15 additions and 2 deletions
+10
View File
@@ -3,6 +3,16 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "template.fullname" . }}
annotations:
{{- if .Values.prometheus.enabled }}
prometheus.io/scrape: "true"
{{- if .Values.application.isSpring }}
prometheus.io/path: /actuator/prometheus
{{- else }}
prometheus.io/path: /metrics
{{- end }}
prometheus.io/port: "{{ .Values.application.actuatorPort }}"
{{- end }}
labels:
{{- include "template.labels" . | nindent 4 }}
spec: