Skip to content

fix(ci): pin --server-side=true alongside --force-conflicts for helm 4 upgrade#1698

Open
zanejohnson-azure wants to merge 1 commit into
ci_prodfrom
zane/fix-helm-force-conflicts-ssa
Open

fix(ci): pin --server-side=true alongside --force-conflicts for helm 4 upgrade#1698
zanejohnson-azure wants to merge 1 commit into
ci_prodfrom
zane/fix-helm-force-conflicts-ssa

Conversation

@zanejohnson-azure
Copy link
Copy Markdown
Contributor

Problem

Stage_3 of ci-aks-prod-release.yaml failed on 2026-05-22 for Monitoring-Model-Cluster-WCUS (and Monitoring-Model-Cluster-WEU) with:

Error: UPGRADE FAILED: invalid client update option(s): forceConflicts enabled when serverSideApply disabled

Root cause

PR #1667 added --force-conflicts to handle SSA field-ownership conflicts, but Helm 4's helm upgrade --server-side defaults to auto, which resolves to:

Prior release ApplyMethod auto resolves to
ssa (server-side apply) true
client-side apply (e.g., release created by Helm 3) false

When auto → false and forceConflicts=true, Helm rejects the combination client-side, before reaching the cluster (see pkg/kube/client.go:729).

That perfectly explains the observed asymmetry: clusters whose last revision was already SSA (e.g., ci-logs-prod-aks-work-load-identity at rev 49) succeeded; Monitoring-Model-Cluster-* releases (originally Helm 3, ApplyMethod = client-side apply) failed.

Fix

Add --server-side=true so SSA is always engaged when --force-conflicts is set.

Why =true (not bare --server-side)

  • helm upgrade defines --server-side as a StringVar ("true"|"false"|"auto"). Bare --server-side would consume the next token as the value.
  • helm install defines --server-side as a BoolVar.
  • The explicit =true form is unambiguous for both subcommands.

Production cluster recovery

Already manually re-deployed both failed clusters out-of-band using the corrected command:

Cluster Before After
Monitoring-Model-Cluster-WCUS rev 13 (failed), CSA rev 14 (deployed), SSA
Monitoring-Model-Cluster-WEU rev 8 (failed), CSA rev 9 (deployed), SSA

As a side-effect, both releases' ApplyMethod flipped CSA → SSA, so any future auto resolution on those releases will produce true and would succeed even without this fix. This PR is still needed for any other cluster whose release history is still CSA (and to keep behavior deterministic for new clusters).

Test plan

The next prod-release pipeline run will exercise this path against both prod clusters; both are now on SSA, so the fix is verified in production via the manual recovery.

…4 upgrade

PR #1667 added --force-conflicts to handle SSA field-ownership
conflicts, but Helm 4's `helm upgrade --server-side` defaults to
"auto", which resolves to false when the existing release's
ApplyMethod is "client-side apply" (e.g., a release originally
created by Helm 3 and never re-applied with SSA). With auto -> false
and forceConflicts=true, Helm rejects the combination client-side
before contacting the cluster:

  invalid client update option(s): forceConflicts enabled when
  serverSideApply disabled

This is exactly what failed Stage_3 against
Monitoring-Model-Cluster-WCUS / -WEU on 2026-05-22, while clusters
whose last revision was already SSA succeeded.

Fix: pass `--server-side=true` explicitly so SSA is engaged
whenever --force-conflicts is set. The `=true` form (not bare
`--server-side`) is required because:
  - `helm upgrade` defines --server-side as a StringVar ("true",
    "false", or "auto"); bare --server-side would consume the
    next token as the value.
  - `helm install` defines --server-side as a BoolVar.
The explicit `=true` form is unambiguous for both subcommands.

Side-effect on first run per cluster: Helm performs a field-manager
handover from `kubectl-client-side-apply` to `helm` (SSA),
which is why --force-conflicts is needed alongside.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zanejohnson-azure zanejohnson-azure requested a review from a team as a code owner May 23, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant