You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose dependent configuration for the case where we have several dependents of the same type #857
Thinking about this, I see two kinds of multiple dependents of same type:
fixed : the number of dependents is know at build time and a discriminating name should be enough. Dependents may be optional if the spec do not require it.
dynamic : the number of dependents is known at reconcile time and depends on the spec of the CR. This is often the case when a CR is a group. After having done such an operator, I do not think it is a good practice. The only pros is that it reduces the number of CRs. Having a lot of CRs and using PerResourcePolling with a low POLL_PERIOD could take down an external system.
Activity
scrocquesel commentedon Jan 30, 2022
Thinking about this, I see two kinds of multiple dependents of same type:
metacosm commentedon Jan 31, 2022
Yes, I tend to think that we should limit ourselves to the fixed case as a start and see how it goes and if we need to make it more dynamic.
andreaTP commentedon Oct 4, 2022
@csviri can you please point out the documentation or example code to see how this is working? Thanks a lot in advance!
csviri commentedon Oct 4, 2022
@andreaTP pls take a look here:
https://github.com/java-operator-sdk/java-operator-sdk/blob/9c1be9d59151f1673b5b2a5bea60543021fabd34/operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/multiplemanageddependentsametype/MultipleManagedDependentResourceConfigMap1.java#L15-L15
Note that this is on
nextbranch, and the api is going to change probably a little.andreaTP commentedon Oct 4, 2022
Thanks for the pointer @csviri , does it make sense to provide "default" discriminators based on something pretty standard like
labels?csviri commentedon Oct 4, 2022
usually I think that would be based on rather some naming convention of the resource. So not sure. Might be if we seem some patterns.
bachmanity1 commentedon Oct 24, 2022
@csviri is this feature available now? If yes, could you please share some example code? (sorry, but example you've shared above is not very clear)
csviri commentedon Oct 24, 2022
@bachmanity1 no, it will come with 4.1 (see milestone). It will be documented for that release too.
bachmanity1 commentedon Oct 24, 2022
ok, got it. Thanks for quick reply.