Skip to content

OLM should remove the resource created by operator once it deletes the operator #2120

Open
@prafull01

Description

@prafull01

Feature Request

Is your feature request related to a problem? Please describe.
When any resource is created by operator through init container which is not natively supported by OLM, all such objects are left in the system when the operator is uninstalled. I want a way to delete any such objects created by the operator.

Even when the RFE of handling all the kubernetes resource through OLM #1996 is done, we might face scenarios where operator needs to create resources through init container.

One of the scenario we have is as follows:

Currently we have two validation webhook in our operator. One handles the operator CRDs which works perfectly fine with the current webhookdefinitions in CSV which creates the webhook with namespaceSelector in case of single namespace installation and clusterwide webhook for all namespace installation. We have another validation webhook which we require only for the install Namespace of the operator, this webhook config with namespace selector(in case of the cluster install also), we create through the init container. This webhook config remains in the system once we remove the operator.

Describe the solution you'd like
One of the possible solution for this problem is, the operator should add the label olm.owner: <CSV_NAME> to all such resources created by the init containers. Once the user deletes the operator, the CSV gets deleted and we should delete all such resources which have label olm.owner: <CSV_NAME> on it.

/kind feature

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.triage/supportIndicates an issue that is a support question.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions