fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Migrate Fleet to Helm v4

Open thardeck opened this issue 2 months ago • 0 comments

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 Atomic option for Fleet or also support the Helm naming of RollbackOnFailure? At the moment Atomic is automatically mapped.
  • Do we want to support OCI digest based chart installations, e.g. oci://registry.example.com/charts/app@sha256:abc123...?

thardeck avatar Nov 13 '25 17:11 thardeck