From 0fb7ac95c02cabfa566a6063939b69078bafdbc9 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Wed, 10 Apr 2024 19:53:50 +0300 Subject: [PATCH] Enable Helm drift detection Signed-off-by: Stefan Prodan --- README.md | 6 ++++++ deploy/apps/podinfo.yaml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index c8135a7..801b220 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,12 @@ ingress-nginx 4.10.0 False True podinfo 6.6.2 False True ``` +> [!NOTE] +> Note that Flux detects changes made directly in-cluster on the objects managed +> by a HelmRelease and automatically [corrects the drift](https://fluxcd.io/flux/components/helm/helmreleases/#drift-detection). +> During an incident or for debugging purposes, you can manually suspend the reconciliation +> of a HelmRelease with `flux suspend hr -n `. + ## Customize the workloads Assuming you want to ship workloads to the production cluster with a different configuration, diff --git a/deploy/apps/podinfo.yaml b/deploy/apps/podinfo.yaml index 2a7587a..02e1674 100644 --- a/deploy/apps/podinfo.yaml +++ b/deploy/apps/podinfo.yaml @@ -23,6 +23,12 @@ spec: kind: HelmRepository name: podinfo interval: 50m + driftDetection: + mode: enabled + ignore: + - paths: ["/spec/replicas"] + target: + kind: Deployment install: remediation: retries: 3