Skip to content

Conversation

@yozel
Copy link
Contributor

@yozel yozel commented Nov 27, 2025

This flag allows specifying field managers whose ownership should be transferred to the helm-controller before performing drift detection. When a disallowed field manager is detected on a managed resource, its field ownership is replaced with the helm-controller's field owner, enabling proper drift detection for fields that were previously modified by other controllers or tools (e.g., kubectl).

This feature mirrors the --override-manager flag available in FluxCD's kustomize-controller, providing consistent behavior across Flux components for managing server-side apply field ownership conflicts.

Since it doesn't change the default behavior, the implementation doesn't introduce any breaking changes.

Fix: #896

@yozel yozel force-pushed the yozel/override-manager branch 2 times, most recently from b7a57ce to 9707168 Compare November 27, 2025 22:57
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This is a great addition that brings helm-controller closer to how Flux does drift detection in general.

@yozel please singoff you commit and force push, see here how to do it https://github.com/fluxcd/helm-controller/pull/1365/checks?check_run_id=56589881613

@stefanprodan stefanprodan added enhancement New feature or request area/drift Drift detection/correction related issues and pull requests labels Nov 28, 2025
@yozel yozel force-pushed the yozel/override-manager branch from 9707168 to 60e09e3 Compare November 28, 2025 09:01
@yozel
Copy link
Contributor Author

yozel commented Nov 28, 2025

@stefanprodan just signed-off the commit 👍

@yozel yozel force-pushed the yozel/override-manager branch from 60e09e3 to d9fbaf0 Compare November 28, 2025 11:10
@yozel
Copy link
Contributor Author

yozel commented Dec 2, 2025

It passes all the tests and checks. @matheuscscp could you take look when you have time? If you have any comments or suggestions, I can work on them immediately.

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please open a PR in website to add the flag to the helm-controller options

@stefanprodan
Copy link
Member

Please squash all commits and force push

@yozel
Copy link
Contributor Author

yozel commented Dec 9, 2025

Changed the wording on the usage of the flag, and created a PR for the website as well: fluxcd/website#2413

This flag allows specifying field managers whose ownership should be
transferred to the helm-controller before performing drift detection.
When a disallowed field manager is detected on a managed resource, its
field ownership is replaced with the helm-controller's field owner,
enabling proper drift detection for fields that were previously
modified by other controllers or tools (e.g., kubectl).

This feature mirrors the --override-manager flag available in FluxCD's
kustomize-controller, providing consistent behavior across Flux
components for managing server-side apply field ownership conflicts.

Signed-off-by: Yasin Özel <[email protected]>
@yozel yozel force-pushed the yozel/override-manager branch from 2bea665 to dd07d87 Compare December 17, 2025 10:16
@yozel
Copy link
Contributor Author

yozel commented Dec 17, 2025

Please squash all commits and force push

I missed this comment, I've squashed and force pushed now

@stefanprodan stefanprodan merged commit 62f162d into fluxcd:main Dec 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/drift Drift detection/correction related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drift mode should detect extra properties

3 participants