From 2bb0fa3a758b68eb98e43746f9f70820fa65b8d8 Mon Sep 17 00:00:00 2001 From: Bhavin Gandhi Date: Thu, 11 Oct 2018 05:51:00 +0530 Subject: [PATCH] [stable/prometheus-adapter] Add checksum of configMap as annotation (#8334) * [stable/prometheus-adapter] Add checksum of configMap as annotation - This adds checksum/config to the annotations which has sha256sum of the file custom-metrics-configmap.yaml - This does the rolling update of the deployment when user does helm upgrade and there are changes to the configMap, so the adapter will pick up the latest changes in the config file - ref: https://docs.helm.sh/charts_tips_and_tricks/#automatically-roll-deployments-when-configmaps-or-secrets-change - Bump chart version Signed-off-by: Bhavin Gandhi * [stable/prometheus-adapter] Bump version to 0.2.0 Signed-off-by: Bhavin Gandhi --- stable/prometheus-adapter/Chart.yaml | 2 +- .../templates/custom-metrics-apiserver-deployment.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/stable/prometheus-adapter/Chart.yaml b/stable/prometheus-adapter/Chart.yaml index 7c0344259a..b683595d55 100644 --- a/stable/prometheus-adapter/Chart.yaml +++ b/stable/prometheus-adapter/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus-adapter -version: v0.1.2 +version: v0.2.0 appVersion: v0.2.1 description: A Helm chart for k8s prometheus adapter home: https://github.com/DirectXMan12/k8s-prometheus-adapter diff --git a/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml b/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml index e1f0bb09ac..9ac2d8e0ad 100644 --- a/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml +++ b/stable/prometheus-adapter/templates/custom-metrics-apiserver-deployment.yaml @@ -21,6 +21,8 @@ spec: release: {{ .Release.Name }} heritage: {{ .Release.Service }} name: {{ template "k8s-prometheus-adapter.name" . }} + annotations: + checksum/config: {{ include (print $.Template.BasePath "/custom-metrics-configmap.yaml") . | sha256sum }} spec: securityContext: allowPrivilegeEscalation: false