Skip to content

Make for a dependent to decide whether the associated resource should be created dynamically #1116

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
metacosm opened this issue Apr 1, 2022 · 5 comments

Comments

@metacosm
Copy link
Collaborator

metacosm commented Apr 1, 2022

There are cases where whether or not a resource needs to be created / updated / deleted, depends on the content of the primary (or even secondary) resource(s). This isn't currently possible but should be supported. A relatively easy to support this use case would be to introduce isCreatable(P primary, Context context) (and associated) methods on AbstractDependentResource so that implementations could provide their own logic if needed.

@metacosm
Copy link
Collaborator Author

metacosm commented Apr 1, 2022

@csviri
Copy link
Collaborator

csviri commented Apr 3, 2022

IMO this should be covered by Conditions, not decided dynamically.

The current logic is that if a Dependent Resource is marked with Creator, Updater , Deleter interface, the respected operation should be executed. It could be very confusing, if something is marked for example Creator, reconcile() is called but its not created.

@csviri
Copy link
Collaborator

csviri commented Apr 3, 2022

I changed the design proposal a bit here: #850 (comment)

Basically this will cover this issue nicely.

@metacosm metacosm added this to the 3.1 milestone May 31, 2022
@csviri
Copy link
Collaborator

csviri commented Jun 2, 2022

This is now covered with reconcileCondition: #850

@csviri
Copy link
Collaborator

csviri commented Jun 15, 2022

if no objections will close this issue, since it is now implemented as reconcilePrecondition.

@csviri csviri closed this as completed Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants