From c1cc6253232d697ad2ae29957cc49de223306b62 Mon Sep 17 00:00:00 2001 From: Matheus Pimenta Date: Thu, 15 Jan 2026 10:04:07 +0000 Subject: [PATCH] chore(defaults): server-side apply SDK defaults should always match the CLI defaults Signed-off-by: Matheus Pimenta --- pkg/action/install.go | 2 +- pkg/action/rollback.go | 5 +++-- pkg/action/upgrade.go | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/action/install.go b/pkg/action/install.go index 38355491a..0fe1f1a6e 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -159,7 +159,7 @@ type ChartPathOptions struct { func NewInstall(cfg *Configuration) *Install { in := &Install{ cfg: cfg, - ServerSideApply: true, + ServerSideApply: true, // Must always match the CLI default. DryRunStrategy: DryRunNone, } in.registryClient = cfg.RegistryClient diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go index 03150532e..459569781 100644 --- a/pkg/action/rollback.go +++ b/pkg/action/rollback.go @@ -64,8 +64,9 @@ type Rollback struct { // NewRollback creates a new Rollback object with the given configuration. func NewRollback(cfg *Configuration) *Rollback { return &Rollback{ - cfg: cfg, - DryRunStrategy: DryRunNone, + cfg: cfg, + ServerSideApply: "auto", // Must always match the CLI default. + DryRunStrategy: DryRunNone, } } diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go index 4b99be603..4c93855b1 100644 --- a/pkg/action/upgrade.go +++ b/pkg/action/upgrade.go @@ -142,7 +142,7 @@ type resultMessage struct { func NewUpgrade(cfg *Configuration) *Upgrade { up := &Upgrade{ cfg: cfg, - ServerSideApply: "auto", + ServerSideApply: "auto", // Must always match the CLI default. DryRunStrategy: DryRunNone, } up.registryClient = cfg.RegistryClient