Skip to content

Support Bulk read-only dependent resources #2233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tomdw opened this issue Feb 5, 2024 · 3 comments · Fixed by #2372
Closed

Support Bulk read-only dependent resources #2233

tomdw opened this issue Feb 5, 2024 · 3 comments · Fixed by #2372
Assignees
Milestone

Comments

@tomdw
Copy link

tomdw commented Feb 5, 2024

On https://javaoperatorsdk.io/docs/dependent-resources#read-only-dependent-resources-vs-event-source there is a section on read only dependent resources.

However, as soon as it is more than 1 dingle dependent resource, i.e. a bulk of dependent resources of the same type, then there is not possibility to make it a read-only resource.

Support for bulk resources through BulkDependentResource assumes that creating and updating those resources is needed. For a read-only dependent resource this is not the case.

The scenario is to make a reconciler/operator also listen to additional dependent resources that are not created by the operator itself. We could use an event source only, but the dependent resources would make it easier.

@csviri
Copy link
Collaborator

csviri commented Feb 5, 2024

Hi @tomdw , thx for the issue, could you describe the use case more in depth? To be hones I see a little value in this. Around read-only dependents was already a dilemma. So could describe please, where/how exactly this would help in you case?

@tomdw
Copy link
Author

tomdw commented Feb 5, 2024

@csviri It has the same value as the read-only dependents documented and advised on the link I provided above. The only things this request adds is to also support this for a one-to-many relationship between the primary and the dependents. It is another operator or process or manual action that creates the dependent resources and the primary needs to watch these and react accordingly.

Example: update its status based on the information from the many dependent resources + when the primary is deleted also cleanup the dependents.

@csviri
Copy link
Collaborator

csviri commented Feb 5, 2024

I see, the only real value I see in this:

  1. as mentioned in the docs, there can be conditions (well mostly ready condition) on a read only dependent - in combination with depends on relation.
  2. you can use this API from the condition:

Otherwise in the background will happen exactly the same as when having a (non-bulk) read only dependent / informer.
So I agree that even this might have an added value, even if that is not that large.

@csviri csviri modified the milestones: 5.1, 5.0 Feb 5, 2024
@csviri csviri self-assigned this Apr 30, 2024
@csviri csviri linked a pull request Apr 30, 2024 that will close this issue
@csviri csviri closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants