-
Notifications
You must be signed in to change notification settings - Fork 897
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
Only watch, don't poll, composite resources #4316
Comments
Thinking out loud, it may be possible to:
The idea being that each time the (XR, Composition) controller was restarted it would take a watch on all of the (types of?) composed resources that appeared in its |
FWIW while this relates to Functions I'm not ready to say this is a blocker for Functions going to beta or even GA at this point. I'd like to see some indication that it's a real constraint before we spend time optimizing. |
@negz How would this account for the deletion of a composed resource? I don't think that deletion of a composed resource would trigger an event on the owning composite? The poll interval will catch this scenario and recreate the composed resource. |
I believe it would as long as the controller of the owning composite was watching whatever type of resource was deleted. e.g. If we can notice that the XR has composed a |
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as |
@sttts PS do you want to add this to the v1.14 milestone? I know its behind a feature flag so it would land as alpha. |
yes, 1.14 is the plan. |
What problem are you facing?
The XR controller currently watches the XR type, but is also poll-triggered, by default polling desired state every 60 seconds. This interval can be changed by the
--poll-interval
flag. The XR reconciler is poll-triggered because it wants to know when composed resources change, in order to correct drift.An XR controller doesn't know what kinds of resources it will compose at start time, which is typically when a controller's watches are configured. Furthermore, two different XRs of the same kind might compose completely different types of resources due to using different Compositions.
How could Crossplane help solve your problem?
Ideally XR reconciliation would be purely watch-triggered. This would result in fewer invocations of the XR reconciler and thus presumably the ability for a particular Crossplane deployment to handle more XRs concurrently. This is also particularly important for Composition Functions, where every XR reconcile may call one or more Functions.
The text was updated successfully, but these errors were encountered: