Open akirillov opened 3 years ago
Note (based on additional clarifications from @akirillov): ensuring that the dependency is not installed when the flag is false
(by uninstalling the dependent instance if present) is an important case. Operator developers would like to be able to rely on such behavior (which, as for now, has no good equivalent).
What would you like to be added: It would be beneficial to enable
Toggle
behavior for tasks with kindKudoOperator
to support optional dependencies and/or to allow a better install-time configuration of complex modular operators.Here's an example using
when
as an additional field for passing the parameter name which controls whether to install the dependency or not:The
when
flag mimics the behavior of theparameter
property from theToggle
task:The control parameter should not necessarily be named
when
, providing it just as an example.Why is this needed: Currently,
KudoOperator
tasks don't support toggle behavior which significantly complicates the handling of the optional dependencies. A good example could be Spark and History Server or Kafka and Schema Registry. The only possible options to handle it today are either include the templates as-is into the parent operator and control the contents at the template level or to implement a job (viaToggle
task) which deploys/removes the dependency based on a parameter value. Also, cascading updates/upgrades become complicated in these scenarios.