Closed ANeumann82 closed 4 years ago
The toggle task should be able to "delete" or not deploy a custom resource for which the CRD is not known to the cluster
that is a failed requirement and I think it should fail if there is a CRD required for an operator installation that should be fixed independent of if its a Toggle task or not.
Well, if the parameter for the Toggle Task is "false", then the CRD is not required to install the operator, correct? And in this case the toggle tasks should simply do nothing and not fail the execution because it doesn't know about the CR that it wants to delete.
got it!
that would be a slightly different delete task. Would that be the same expectation from Delete
task or just Toggle
task?
Good question. My gut feeling says that it should only be like that for the Toggle task, as it depends on a parameter and is often used to enable/disable deployment of resources - I'm not fully sure what the DeleteTask would be used for, but I'd expect it to fail if one tried to delete an unknown custom resource.
But I wouldn't mind otherwise as well
What happened: Tried to change a resource deployment to use a Toggle Task. The resource is a custom resource for a CRD that may not exist on the cluster. KUDO failed with:
What you expected to happen: The toggle task should be able to "delete" or not deploy a custom resource for which the CRD is not known to the cluster
How to reproduce it (as minimally and precisely as possible): Use a toggle task with a custom resource which is not known to the cluster.
Anything else we need to know?: The
task_delete.go
uses the enhancer which tries to determine if the resource to deploy is namespaced or not - which fails for an unknown custom resource.