Skip to content

feat: add support for helm v4 --server-side flag#1021

Open
yxxhero wants to merge 2 commits into
masterfrom
feat/server-side-flag
Open

feat: add support for helm v4 --server-side flag#1021
yxxhero wants to merge 2 commits into
masterfrom
feat/server-side-flag

Conversation

@yxxhero

@yxxhero yxxhero commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add support for the Helm v4 --server-side upgrade flag, as requested in #1020.

The flag accepts "true", "false", or "auto" (default "auto"), matching helm v4 upgrade exactly.

Changes

  • cmd/upgrade.go: Added --server-side flag (StringVar, default "auto") with input validation in RunE.
  • cmd/helm.go: Forward the flag to helm when running Helm v4:
    • helm upgrade --dry-run (HELM_DIFF_USE_UPGRADE_DRY_RUN=true): forward all values including "auto".
    • helm template: forward only "true"/"false" — template registers --server-side as a bool (default true) that rejects "auto".
    • Helm v3: flag is accepted but not forwarded (does not exist).
  • README.md: Documented the flag in alphabetical order in both command sections.
  • Tests: Added TestServerSideFlagValidation and TestGetServerSideFlags.

Notes

  • The flag has no effect on manifest rendering in dry-run mode — both helm template and helm upgrade --dry-run bail out before the apply step where ServerSideApply is consulted. It is forwarded for semantic correctness and wrapper compatibility.
  • Single isHelmVersionGreaterThanEqual call (no redundant subprocess invocations).

Closes #1020

yxxhero added 2 commits June 16, 2026 11:13
Add the --server-side flag to , matching helm v4's
upgrade command. The flag accepts "true", "false", or "auto" (default
"auto") and is forwarded to helm when running Helm v4:

-  (HELM_DIFF_USE_UPGRADE_DRY_RUN=true): all
  values including "auto" are forwarded.
- : only "true"/"false" are forwarded, since template
  registers --server-side as a bool (default true) that does not accept
  "auto".

The flag is Helm v4 only — it is accepted but not forwarded when running
Helm v3 (the flag does not exist there).

Note: --server-side has no effect on manifest rendering in dry-run mode.
It is forwarded for semantic correctness and wrapper compatibility so
that helm-diff can be used with the same flags as .

Closes #1020

Signed-off-by: yxxhero <aiopsclub@163.com>
The engineerd/setup-kind@v0.6.2 tag points to a commit that lacks the
compiled dist/main/index.js entry point, causing all integration test
jobs to fail with:
  File not found: '.../setup-kind/v0.6.2/dist/main/index.js'

Switch to helm/kind-action@v1.14.0, the official Helm project kind
action, which properly commits its build artifacts.

Signed-off-by: yxxhero <aiopsclub@163.com>
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.

Please add support for the helm4 upgrade flag " --server-side"

1 participant