Skip to content

docs: lookup only runs for template, install and upgrade - #2307

Merged
TerryHowe merged 2 commits into
helm:mainfrom
fjvbn2003:docs-lookup-dry-run
Oct 17, 2026
Merged

TerryHowe merged 2 commits into
helm:mainfrom
fjvbn2003:docs-lookup-dry-run

Conversation

@fjvbn2003

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

The lookup section of "Template Functions and Pipelines" (current docs and version-3) says:

To test lookup against a running cluster, helm template|install|upgrade|delete|rollback --dry-run=server should be used instead

delete (uninstall) and rollback do not belong in this list:

  • Neither command renders templates. pkg/action/rollback.go builds the target release from previousRelease.Manifest, and uninstall deletes the resources recorded in the stored release. lookup is never called by either command, so there is nothing to test with them.
  • In Helm 3, both flags are booleans (cmd/helm/rollback.go: f.BoolVar(&client.DryRun, "dry-run", ...), unchanged on v3.22.1, and the same for uninstall). The documented flag is rejected:
$ helm rollback --dry-run=server
Error: invalid argument "server" for "--dry-run" flag: strconv.ParseBool: parsing "server": invalid syntax

In Helm 4, helm uninstall --dry-run is still a boolean (pkg/cmd/uninstall.go).

This PR removes the two commands from the sentence in docs/ and versioned_docs/version-3/. It also says why lookup does not run for them. The rest of the paragraph is unchanged. I did not change the translated copies under i18n/.

How I checked the rest of the sentence (Helm v3.18.2, against a cluster, with a one-template chart that renders (lookup "v1" "Namespace" "" "kube-system").metadata.name):

Command Result
helm template d ./chart lookup returns an empty map, so the template fails with nil pointer evaluating interface {}.name
helm template d ./chart --dry-run=client same
helm template d ./chart --dry-run=server renders found: "kube-system"

Special notes for your reviewer:

I did not run yarn build locally. This is a text-only change to one paragraph in two files.

This change was drafted with AI assistance and reviewed by me.

🤖 Generated with Claude Code

The lookup section told readers to use `helm delete|rollback
--dry-run=server` to test lookup against a cluster. Neither command
renders templates: rollback reapplies the stored manifest of an earlier
revision and uninstall deletes the stored resources, so lookup is never
called. In Helm 3 both commands also take a boolean --dry-run, and
`helm rollback --dry-run=server` fails with
`invalid argument "server" for "--dry-run" flag`.

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

@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

@TerryHowe
TerryHowe merged commit dc74ea9 into helm:main Oct 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants