Skip to content

Helm operator feature request: for CR delete, add option to wait until all resources are deleted before removing the finalizer #4401

@mikeshng

Description

@mikeshng

Feature Request

Describe the problem you need a feature to resolve.

For the deletion of the Helm operator CR resource, there is no option to wait until all the resources are deleted before removing its finalizer.

The current implementation seems to call the equivalent of helm uninstall but that command behaves asynchronously, so some of the resources might not actually be fully deleted before the Helm operator CR is gone.

Even if helm uninstall implements a synchronous --wait flag, it might not be something that the Helm operator want to use because it will block the controller.

Describe the solution you'd like.

Add a new option that allows the Helm operator delete CR to check if all the resources are deleted before removing the finalizer.

After the helm uninstall call, if the option is enabled, then check all the non-keep resources in the Status.DeployedRelease.Manifest and see if they still exists or not. If there is at least one resource that is not deleted re-queue the reconcile instead of removing the finalizer.

Note: maybe consider if this new cleanup step finds a resource, should it trigger the resource delete again?

Related to:

/language helm

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.language/helmIssue is related to a Helm operator project

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions