-
Notifications
You must be signed in to change notification settings - Fork 1.5k
KEP-5229: Asynchronous API calls during scheduling #5249
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
base: master
Are you sure you want to change the base?
KEP-5229: Asynchronous API calls during scheduling #5249
Conversation
macsko
commented
Apr 16, 2025
- One-line PR description: Add KEP-5229
- Issue link: Asynchronous API calls during scheduling #5229
- Other comments:
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: macsko The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @dom4ha @sanposhiho I have written some possible approaches to these API calls to start the discussion. I will not be visibly active for the next three weeks, but feel free to comment. |
@macsko: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
- `nominatedNodeName` scenario support would require more effort in (1.1) or (1.2). | ||
|
||
|
||
#### 2.2: Make the API calls queued |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like queueing API calls might be a good direction long term and probably won't be that hard to implement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great summary! I'll take time reading through it and put some comments after that.
@@ -0,0 +1,3 @@ | |||
kep-number: 5229 | |||
alpha: | |||
approver: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to add me here
This would require implementing advanced logic for queueing API calls in the kube-scheduler and migrating **all** pod-based API calls done during scheduling to this method, | ||
potentially including the binding API call. The new component should be able to resolve any conflicts in the incoming API calls as well as parallelize them properly, | ||
e.g., don't parallelize two updates of the same pod. This requires [making the API calls queued](#22-make-the-api-calls-queued) or | ||
[sending API calls through a kube-scheduler's cache](#23-send-api-calls-through-a-kube-schedulers-cache) to be implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conceptually what you need here is something pretty similar to DeltaFIFO we use in client-go:
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/cache/delta_fifo.go
We wouldn't operate on object, but on their updates, but that's conceptually exactly what you need:
- tracking changes to a given object all together
- a concept of deduping (if I already scheduled a pod but didn't yet sent the failures, don't send them; if I have multiple failures not yet sent to report, is the last one only valid?, etc.)
- dom4ha | ||
- sanposhiho | ||
approvers: | ||
- alculquicondor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to @dom4ha or @sanposhiho