fleet
fleet copied to clipboard
Migrate Fleet to Helm v4
Upgrade Helm SDK from v3 to v4 and adapt Fleet to breaking API changes:
Changes:
- Replace deprecated fields and types:
- DryRun (bool) -> DryRunStrategy enum (None=execute, Client=dry-run)
- Force -> ForceReplace for resource replacement
- Atomic -> RollbackOnFailure for rollback on upgrade failure
- Removed ClientOnly (replaced by DryRunStrategy)
- Removed Log method - migrate to controller-runtime's context-based logging
- Add required WaitStrategy configuration (StatusWatcherStrategy/HookOnlyStrategy)
- Fix ServerSideApply behavior:
- Set to false when TakeOwnership=true to avoid managedFields conflicts
- Use "auto" mode for upgrades to preserve initial apply method
- Add ContentCache field to downloader.Manager (required in Helm v4)
- Update drift correction tests to reflect Helm v4's improved client-side apply
- Refactor helmdeployer install() function to reduce cyclomatic complexity
Followup tasks:
- Do we want to stay with the
Atomicoption for Fleet or also support the Helm naming ofRollbackOnFailure? At the momentAtomicis automatically mapped. - Do we want to support OCI digest based chart installations, e.g.
oci://registry.example.com/charts/app@sha256:abc123...?