java-operator-sdk
java-operator-sdk copied to clipboard
Support for Bulk DependentResource Management
Support of managing multiple similar resources dynamically - depending on the specs of the primary resource.
To be able to discriminate which dependent resource we are managing the desired should receive the index of the resource:
protected R desired(P primary, Context<P> context, int index) or inside the Context object. (This would require an extended Context for the dependent resources.
Questions to clarify/discuss
Should be this on top level. Thus directly the DependentResource interface should support this?. And have a wrapper dependent resource over that, that supports count? (basically agree on class level design)
Notes
- This is analogy to
countin terraform, see: https://www.terraform.io/language/meta-arguments/count - this issue closely related to an issue where an event source needs to support multiple secondary resources: https://github.com/java-operator-sdk/java-operator-sdk/issues/1175