Skip to content

helm: support ignore-not-found in undeploy targets#7100

Open
kiku-jw wants to merge 1 commit into
operator-framework:masterfrom
kiku-jw:codex/helm-ignore-not-found
Open

helm: support ignore-not-found in undeploy targets#7100
kiku-jw wants to merge 1 commit into
operator-framework:masterfrom
kiku-jw:codex/helm-ignore-not-found

Conversation

@kiku-jw

@kiku-jw kiku-jw commented Jun 13, 2026

Copy link
Copy Markdown

What this does

Adds the same ignore-not-found Makefile option used by Go projects to Helm-scaffolded projects.

This updates the Helm scaffold template and the generated Helm sample Makefile so make uninstall ignore-not-found=true and make undeploy ignore-not-found=true continue deleting remaining resources when one resource is already absent.

Fixes #5195.

Testing

  • go test ./internal/plugins/helm/v1/scaffolds/...
  • go build -tags=containers_image_openpgp -o build/operator-sdk ./cmd/operator-sdk

I also attempted to run PATH="$PWD/build:$PATH" go run ./hack/generate/samples/generate_testdata.go; it reached Helm sample bundle generation but failed in the generated sample while downloading/extracting kustomize with tar: Error opening archive: Unrecognized archive format, so I restored the generated sample and kept the expected Makefile update only.

@openshift-ci openshift-ci Bot requested review from acornett21 and anik120 June 13, 2026 19:07
Signed-off-by: Nick <Kiku.Reise@gmail.com>
@kiku-jw kiku-jw force-pushed the codex/helm-ignore-not-found branch from edc7627 to 29cc801 Compare June 13, 2026 19:07

@kunalworldwide kunalworldwide left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This aligns the Helm plugin's Makefile scaffold with the Go and Ansible plugin scaffolds, which already have ignore-not-found support on uninstall and undeploy targets.

The ifndef guard defaults to false so existing behavior is unchanged unless the user explicitly passes make undeploy ignore-not-found=true. Testdata Makefile is updated consistently.

One thought: the deploy target doesn't get --ignore-not-found — this is correct since kubectl apply doesn't have that flag (it's a delete-only concern). Just confirming the asymmetry is intentional and matches the other plugin scaffolds.

LGTM.

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.

Add --ignore-not-found=true to scaffolded undeploy make target

2 participants