-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
add LabelSelectorSpreadPriority for ReplicaSet in scheduler #21074
add LabelSelectorSpreadPriority for ReplicaSet in scheduler #21074
Conversation
Labelling this PR as size/L |
GCE e2e build/test failed for commit 27c77c85f4ff82e4ae5b6fd0b5966ca2b741fafc. |
@mqliang Most users are going to be using ReplicationController for a while, so we can't remove the RC-based functionality from the scheduler yet. We should add ReplicaSet, but keep ReplicationController. |
+1 to @bgrant0607 's comment. Thanks for noticing this, @mqliang . |
I think I got it: We can replace ReplicationController to ReplicaSet in DeploymentController because k8s v1.0 has no DeploymentController. But for |
27c77c8
to
93b9675
Compare
GCE e2e build/test failed for commit 93b96758d087426dcab0170bd1f3e0697c9bbf48. |
93b9675
to
15f9591
Compare
GCE e2e build/test failed for commit 15f9591f3399c8f0f89337ed78945362879dcca1. |
Instead of creating a new LabelSelectorSpread type and associated CalculateSpreadPriority(), it would be better to combine these into the existing SelectorSpread and its CalculateSpreadPriority(). So you would have
and in SelectorSpread.CalculateSpreadPriority() you would do
Once you have created the Does that sound reasonable? |
15f9591
to
cbde1f3
Compare
GCE e2e build/test failed for commit cbde1f3fdb142c74a7def7f9192bab99d5e018ab. |
ping @mqliang -- I'd really like to get this into 1.2 |
cbde1f3
to
d7269ab
Compare
GCE e2e build/test failed for commit d7269ab44a6b578b4651b79e6bf1e9e8a2772e3d. |
d7269ab
to
c888649
Compare
GCE e2e test build/test passed for commit c888649882c075f81ca4778a694841c634c6b987. |
@davidopp Updated. PTAL. |
@@ -229,6 +234,11 @@ func (f *ConfigFactory) CreateFromKeys(predicateKeys, priorityKeys sets.String, | |||
// Cache this locally. | |||
cache.NewReflector(f.createControllerLW(), &api.ReplicationController{}, f.ControllerLister.Store, 0).RunUntil(f.StopEverything) | |||
|
|||
// Watch and cache all ReplicaSet objects. Scheduler needs to find all pods | |||
// created by the same services or ReplicaSets, so that it can spread them correctly. |
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.
s/services or ReplicaSets/services or ReplicationControllers or ReplicaSets/
also, please make the same fix on L233 and L228
This looks great -- thanks! I just had one very minor comment. |
c888649
to
fbf859c
Compare
GCE e2e test build/test passed for commit fbf859c09d0614320674352e3baae3b7eb6c8da4. |
fbf859c
to
0aab44a
Compare
@davidopp Comments addressed. PTAL |
LGTM Thanks! |
GCE e2e test build/test passed for commit 0aab44a. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 0aab44a. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
replace ReplicationController to ReplicaSet in scheduler
@bgrant0607 @madhusudancs