Skip to content

Remove deprecated '--create-pods' flag - #31023

Merged
mattfarina merged 1 commit into
helm:mainfrom
gjenkins8:gjenkins/rm_recreate_pods
Jul 3, 2025
Merged

mattfarina merged 1 commit into
helm:mainfrom
gjenkins8:gjenkins/rm_recreate_pods

Conversation

@gjenkins8

Copy link
Copy Markdown
Member

What this PR does / why we need it:
The upgrade --recreate-pods flag was deprecated in Helm 3: #6463

Remove this flag, and associated action fields/code

Special notes for your reviewer:
Users should for long be utilizing a deployment annotation: https://helm.sh/docs/howto/charts_tips_and_tricks/#automatically-roll-deployments

If applicable:

  • this PR contains user facing changes (the docs needed label should be applied if so)
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 3, 2025

@TerryHowe TerryHowe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mattfarina mattfarina left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattfarina
mattfarina merged commit e8be2e5 into helm:main Jul 3, 2025
@gjenkins8
gjenkins8 deleted the gjenkins/rm_recreate_pods branch July 3, 2025 16:03
@scottrigby scottrigby added this to the 4.0.0 milestone Nov 5, 2025
yxxhero added a commit to helmfile/helmfile that referenced this pull request Oct 16, 2026
* fix: skip recreatePods on Helm 4, which removed --recreate-pods

- Helm 4 removed `--recreate-pods` (helm/helm#31023) and fails with "unknown flag", so a release
  with `recreatePods: true` broke `sync` and `apply`. On Helm 4 the flag is now left out with a
  warning; Helm 3 still receives it.
- The upgrade flag tests gain Helm 4 cases, and the existing ones are pinned to Helm 3 so they no
  longer depend on the installed helm binary.
- A test checks that the warning names the release on Helm 4 and is not logged on Helm 3.
- The configuration docs note that recreatePods is ignored on Helm 4.

Signed-off-by: Cayan <[email protected]>

* refactor: flatten recreatePods flag logic in flagsForUpgrade

Drop the nested if-in-if and the st.logger nil-guard: no other log call in
state.go nil-checks the logger (e.g. the --color Helm 4 skip). Compute
recreatePodsEnabled and branch via a tagless switch, matching the switch
style already used elsewhere in state.go: warn on Helm 4, append
--recreate-pods otherwise. The flagsForUpgrade table runner now uses the
shared discard logger so the Helm 4 recreate-pods cases log safely.

Signed-off-by: yxxhero <[email protected]>

---------

Signed-off-by: Cayan <[email protected]>
Signed-off-by: yxxhero <[email protected]>
Co-authored-by: yxxhero <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants