Skip to content

Commit 04a65a8

Browse files
committed
fix: enable ServerSideApply when ForceConflicts is set for Helm v4 compatibility
Helm v4 introduced a validation that rejects ForceConflicts = true when ServerSideApply is disabled, returning: `invalid client update option(s): forceConflicts enabled when serverSideApply disabled` Both getHelmInstallClient and getHelmUpgradeClient were setting ForceConflicts = true unconditionally without enabling ServerSideApply, causing all Helm chart installs and upgrades to fail when running against Helm v4. Fix: set ServerSideApply = true alongside ForceConflicts = true in both client builders.
1 parent 35368b2 commit 04a65a8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

controllers/handlers_helm.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3568,6 +3568,7 @@ func getHelmInstallClient(ctx context.Context, requestedChart *configv1beta1.Hel
35683568
installClient.Description = getDescriptionValue(requestedChart.Options)
35693569
installClient.PassCredentialsAll = getPassCredentialsToAllValue(requestedChart.Options)
35703570
installClient.TakeOwnership = getTakeOwnershipHelmValue(requestedChart.Options, false)
3571+
installClient.ServerSideApply = true
35713572
installClient.ForceConflicts = true
35723573
if actionConfig.RegistryClient != nil {
35733574
installClient.SetRegistryClient(actionConfig.RegistryClient)
@@ -3631,6 +3632,7 @@ func getHelmUpgradeClient(requestedChart *configv1beta1.HelmChart, actionConfig
36313632
upgradeClient.CaFile = registryOptions.caPath
36323633
upgradeClient.PassCredentialsAll = getPassCredentialsToAllValue(requestedChart.Options)
36333634
upgradeClient.TakeOwnership = getTakeOwnershipHelmValue(requestedChart.Options, true)
3635+
upgradeClient.ServerSideApply = true
36343636
upgradeClient.ForceConflicts = true
36353637

36363638
if actionConfig.RegistryClient != nil {

0 commit comments

Comments
 (0)