fluxcd / helm-controller

The GitOps Toolkit Helm reconciler, for declarative Helming
https://fluxcd.io
Apache License 2.0
404 stars 160 forks source link

Drift mode should detect extra properties #896

Open darkweaver87 opened 6 months ago

darkweaver87 commented 6 months ago

Hello,

When drift mode is set either to warn or enabled, it should detect extra map keys and extra list objects. For instance if an HelmRelease installs a Deployment with some environment variables set, it should detect this deployment has some manually added extra environment variables for instance and with correction enabled, remove those.

Thanks,

Rémi

souleb commented 4 months ago

As stated here, we compare object from the helm storage for a given release with existing versions in cluster. This is done using ssa dry-run, i.e. the kube-api server does it. I believe that what you describe should already be implemented. Can you provide more details on your observation?

hoerup commented 2 months ago

(using flux 2.2.3 )

Just modified one of my Deployments which is installed via a HelmRelease and with driftmode enabled and added a dns override

spec:
  template:
    spec:
      hostAliases:
      - hostnames:
        - somehostname
        ip: 127.0.0.1

and this is not detected by flux