diff --git a/charts/prometheus-adapter/Chart.yaml b/charts/prometheus-adapter/Chart.yaml index a0c3fb50c8a5..ce6a37f59db0 100644 --- a/charts/prometheus-adapter/Chart.yaml +++ b/charts/prometheus-adapter/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: prometheus-adapter -version: 4.0.2 +version: 4.1.0 appVersion: v0.10.0 description: A Helm chart for k8s prometheus adapter home: https://github.com/kubernetes-sigs/prometheus-adapter diff --git a/charts/prometheus-adapter/templates/deployment.yaml b/charts/prometheus-adapter/templates/deployment.yaml index 12492a08f2e6..844d7349496d 100644 --- a/charts/prometheus-adapter/templates/deployment.yaml +++ b/charts/prometheus-adapter/templates/deployment.yaml @@ -1,9 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - {{- if .Values.customAnnotations }} + {{- if or .Values.customAnnotations .Values.deploymentAnnotations }} annotations: - {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- with .Values.customAnnotations }} + {{- toYaml .Values.customAnnotations | nindent 4 }} + {{- end }} + {{- with .Values.deploymentAnnotations }} + {{- toYaml .Values.deploymentAnnotations | nindent 4 }} + {{- end }} {{- end }} labels: {{- include "k8s-prometheus-adapter.labels" . | indent 4 }} @@ -17,10 +22,6 @@ spec: {{- include "k8s-prometheus-adapter.selectorLabels" . | indent 6 }} template: metadata: - {{- if .Values.customAnnotations }} - annotations: - {{- toYaml .Values.customAnnotations | nindent 8 }} - {{- end }} labels: {{- include "k8s-prometheus-adapter.labels" . | indent 8 }} {{- with .Values.podLabels }} @@ -30,7 +31,10 @@ spec: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} - {{- toYaml . | trim | nindent 8 }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.customAnnotations }} + {{- toYaml . | nindent 8 }} {{- end }} spec: serviceAccountName: {{ template "k8s-prometheus-adapter.serviceAccountName" . }} diff --git a/charts/prometheus-adapter/values.yaml b/charts/prometheus-adapter/values.yaml index e9d0714d530e..2eb1a037094b 100644 --- a/charts/prometheus-adapter/values.yaml +++ b/charts/prometheus-adapter/values.yaml @@ -217,6 +217,9 @@ podLabels: {} # Annotations added to the pod podAnnotations: {} +# Annotations added to the deployment +deploymentAnnotations: {} + hostNetwork: # Specifies if prometheus-adapter should be started in hostNetwork mode. #