From 06ed881e376ab16885c90e12e2cc9cda594b372a Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Thu, 9 Mar 2023 19:51:25 +0200 Subject: [PATCH] Disable drift detection for kube-prometheus-stack webhooks Signed-off-by: Stefan Prodan --- .../kube-prometheus-stack/release.yaml | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/manifests/monitoring/kube-prometheus-stack/release.yaml b/manifests/monitoring/kube-prometheus-stack/release.yaml index d7bab61a..f2c60c5c 100644 --- a/manifests/monitoring/kube-prometheus-stack/release.yaml +++ b/manifests/monitoring/kube-prometheus-stack/release.yaml @@ -6,7 +6,7 @@ spec: interval: 5m chart: spec: - version: "41.x" + version: "45.x" chart: kube-prometheus-stack sourceRef: kind: HelmRepository @@ -31,3 +31,21 @@ spec: podMonitorSelector: matchLabels: app.kubernetes.io/component: monitoring + postRenderers: + - kustomize: + patches: + - target: + # Ignore these objects from Flux diff as they are mutated from chart hooks + kind: (ValidatingWebhookConfiguration|MutatingWebhookConfiguration) + name: kube-prometheus-stack-admission + patch: | + - op: add + path: /metadata/annotations/helm.toolkit.fluxcd.io~1driftDetection + value: disabled + - target: + # Ignore these objects from Flux diff as they are mutated at apply time but not at dry-run time + kind: PrometheusRule + patch: | + - op: add + path: /metadata/annotations/helm.toolkit.fluxcd.io~1driftDetection + value: disabled