diff --git a/helm/template/Chart.yaml b/helm/template/Chart.yaml index e67e364..4b40308 100644 --- a/helm/template/Chart.yaml +++ b/helm/template/Chart.yaml @@ -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.17 +version: 0.1.18 maintainers: - name: Jim Martens url: https://2martens.de @@ -10,8 +10,8 @@ sources: - https://git.2martens.de/2martens/cloud-configuration annotations: artifacthub.io/changes: | - - kind: added - description: Added prometheus support + - kind: fixed + description: Fixed location of annotations for prometheus artifacthub.io/signKey: | fingerprint: F0F153B65BAD467201D7544E47393ABD1F96B7C8 url: https://mafiasi.de/pks/key/47393ABD1F96B7C8.asc diff --git a/helm/template/templates/_deployment.yaml b/helm/template/templates/_deployment.yaml index 2102984..1db4912 100644 --- a/helm/template/templates/_deployment.yaml +++ b/helm/template/templates/_deployment.yaml @@ -3,16 +3,6 @@ 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: @@ -27,6 +17,15 @@ spec: metadata: {{- with .Values.podAnnotations }} 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 }} {{- end }} labels: