Skip to content

Support cascading delete on custom resources #1041

@rimesc

Description

@rimesc

The interface returned by KubernetesClient.customResources(...) doesn't provide a method to set cascading=true.

The object itself (an instance of CustomResourcesOperationsImpl) does have a cascading flag, and a constructor that allows it to be specified, but it's defaulted to false in the only constructor that's actually used.

As a work around, you can construct an instance yourself using the constructor that does have the relevant parameter, but it would be helpful if the interface had a method for setting it, as other resource types do. It's worth noting that while technically the object does have a method for setting cascading=true that it inherits from the base class, casting to the base class and calling the method explodes because it uses reflection to find a suitable constructor and no such constructor exists in this case.

In particular, this makes it difficult to delete Argo workflows and their underlying pods.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions