-
Notifications
You must be signed in to change notification settings - Fork 312
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
koord-scheduler: check if reservation port match the pod #908
koord-scheduler: check if reservation port match the pod #908
Conversation
Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
Codecov ReportBase: 66.63% // Head: 66.63% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #908 +/- ##
==========================================
- Coverage 66.63% 66.63% -0.01%
==========================================
Files 238 238
Lines 27675 27726 +51
==========================================
+ Hits 18442 18475 +33
- Misses 7965 7983 +18
Partials 1268 1268
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eahydra The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
…-sh#908) Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
Signed-off-by: KunWuLuan kunwuluan@gmail.com
Increase the judgment on port when judging whether the pod matches the reservation.
Now koordinator only judge on resource and owners when judging whether the pod matches the reservation. And remove the ports according to the pods' requirement. (https://github.com/koordinator-sh/koordinator/blob/main/pkg/scheduler/plugins/reservation/hook.go#L240)
By the implementation, reserve ports are created by all reservations on node, so the pod may remove the ports which are reserved by more than one reservation.
If a pod requires ports which are reserved by more than one reservation and its resource requirement can be satisfied by one of the reservations, the pod can be bind to the node. Then this pod will use the ports that are reserved by other reservations, which will cause the port conflicts with the other pods.
For example, reservation A reserve 100m cpu, 100Mi mem and port 1000, reservation B reserve 1000m cpu and 1000Mi mem. Now a pod which require 1000m cpu and 1000Mi mem with port 1000 can pass the filter. In this case the pod will be bound to reservation B. Then the pod who requires 100m cpu, 100Mi mem and port 1000 can still pass the filter. And it will have port conflict with the previous pod.