Fixed annotation location

This commit is contained in:
2023-11-02 00:17:38 +01:00
parent ec25391884
commit b4637965d3
2 changed files with 12 additions and 13 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ apiVersion: v2
name: template name: template
description: A Helm library chart containing common templates, keeping application templates short description: A Helm library chart containing common templates, keeping application templates short
type: library type: library
version: 0.1.17 version: 0.1.18
maintainers: maintainers:
- name: Jim Martens - name: Jim Martens
url: https://2martens.de url: https://2martens.de
@@ -10,8 +10,8 @@ sources:
- https://git.2martens.de/2martens/cloud-configuration - https://git.2martens.de/2martens/cloud-configuration
annotations: annotations:
artifacthub.io/changes: | artifacthub.io/changes: |
- kind: added - kind: fixed
description: Added prometheus support description: Fixed location of annotations for prometheus
artifacthub.io/signKey: | artifacthub.io/signKey: |
fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8
url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc
+9 -10
View File
@@ -3,16 +3,6 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "template.fullname" . }} 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: labels:
{{- include "template.labels" . | nindent 4 }} {{- include "template.labels" . | nindent 4 }}
spec: spec:
@@ -27,6 +17,15 @@ spec:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
annotations: 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 }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels: