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
+2 -2
View File
@@ -2,7 +2,7 @@ apiVersion: v2
name: template
description: A Helm library chart containing common templates, keeping application templates short
type: library
version: 0.1.16
version: 0.1.17
maintainers:
- name: Jim Martens
url: https://2martens.de
@@ -11,7 +11,7 @@ sources:
annotations:
artifacthub.io/changes: |
- kind: added
description: Added revisionHistoryLimit config
description: Added prometheus support
artifacthub.io/signKey: |
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
+3
View File
@@ -54,6 +54,9 @@ application:
profile: prod
isSpring: true
prometheus:
enabled: true
# Overwrite with application specific environment variables
# Each item has key and value, where the value is parsed as a template
environment: []
+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: