Skip to content

Expose dependent configuration for the case where we have several dependents of the same type #857

Description

@metacosm

How do dependents work when we have more than one secondary resource (like having 3 deployments) ?

Originally posted by @sebastienblanc in #785 (comment)

Activity

  1. self-assigned this
    on Jan 21, 2022
  2. scrocquesel commented on Jan 30, 2022

    @scrocquesel
    Contributor

    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.
  3. metacosm commented on Jan 31, 2022

    @metacosm
    CollaboratorAuthor

    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.

  4. added this to the 3.2 milestone on Jun 2, 2022
  5. modified the milestones: 3.2, 3.3 on Jun 28, 2022
  6. linked a pull request that will close this issueOptional eventsource on dependent resources #1479on Sep 28, 2022
  7. andreaTP commented on Oct 4, 2022

    @andreaTP
    Collaborator

    @csviri can you please point out the documentation or example code to see how this is working? Thanks a lot in advance!

  8. csviri commented on Oct 4, 2022

    @csviri
    Collaborator

    @csviri can you please point out the documentation or example code to see how this is working? Thanks a lot in advance!

    @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 next branch, and the api is going to change probably a little.

  9. andreaTP commented on Oct 4, 2022

    @andreaTP
    Collaborator

    Thanks for the pointer @csviri , does it make sense to provide "default" discriminators based on something pretty standard like labels?

  10. csviri commented on Oct 4, 2022

    @csviri
    Collaborator

    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.

  11. bachmanity1 commented on Oct 24, 2022

    @bachmanity1
    Contributor

    @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)

  12. csviri commented on Oct 24, 2022

    @csviri
    Collaborator

    @bachmanity1 no, it will come with 4.1 (see milestone). It will be documented for that release too.

  13. bachmanity1 commented on Oct 24, 2022

    @bachmanity1
    Contributor

    @bachmanity1 no, it will come with 4.1 (see milestone). It will be documented for that release too.

    ok, got it. Thanks for quick reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions