From 84c295f06b55b2d224f6bd37b27246bdbb82cf1f Mon Sep 17 00:00:00 2001 From: Rita Canavarro <98762287+ritaCanavarro@users.noreply.github.com> Date: Wed, 23 Aug 2023 11:35:10 +0100 Subject: [PATCH] [FEAT] Prometheus Adapter reload (#2195) * [FEAT] Prometheus Adapter reload Signed-off-by: rita.canavarro <ritinhamcm@gmail.com> * [FEAT] Prometheus Adapter reload Signed-off-by: rita.canavarro <ritinhamcm@gmail.com> --------- Signed-off-by: rita.canavarro <ritinhamcm@gmail.com> --- .../components/prometheus-adapter.libsonnet | 7 ++++++- manifests/prometheusAdapter-deployment.yaml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet b/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet index eb388662..78541d2c 100644 --- a/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet +++ b/jsonnet/kube-prometheus/components/prometheus-adapter.libsonnet @@ -300,7 +300,12 @@ function(params) { }, }, template: { - metadata: { labels: pa._config.commonLabels }, + metadata: { + annotations: { + 'checksum.config/md5': std.md5(std.manifestYamlDoc(pa._config.config)), + }, + labels: pa._config.commonLabels, + }, spec: { containers: [c], serviceAccountName: $.serviceAccount.metadata.name, diff --git a/manifests/prometheusAdapter-deployment.yaml b/manifests/prometheusAdapter-deployment.yaml index 5ea3fb39..c2d4cfc4 100644 --- a/manifests/prometheusAdapter-deployment.yaml +++ b/manifests/prometheusAdapter-deployment.yaml @@ -21,6 +21,8 @@ spec: maxUnavailable: 1 template: metadata: + annotations: + checksum.config/md5: 3b1ebf7df0232d1675896f67b66373db labels: app.kubernetes.io/component: metrics-adapter app.kubernetes.io/name: prometheus-adapter -- GitLab