-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Separate rate limiters for Pod evictions for different zones in NodeController #28843
Conversation
@@ -239,8 +238,7 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig | |||
glog.Warningf("Unsuccessful parsing of service CIDR %v: %v", s.ServiceCIDR, err) | |||
} | |||
nodeController := nodecontroller.NewNodeController(cloud, clientset.NewForConfigOrDie(restclient.AddUserAgent(kubeconfig, "node-controller")), | |||
s.PodEvictionTimeout.Duration, flowcontrol.NewTokenBucketRateLimiter(s.DeletingPodsQps, int(s.DeletingPodsBurst)), | |||
flowcontrol.NewTokenBucketRateLimiter(s.DeletingPodsQps, int(s.DeletingPodsBurst)), | |||
s.PodEvictionTimeout.Duration, s.DeletingPodsQps, int(s.DeletingPodsBurst), s.DeletingPodsQps, int(s.DeletingPodsBurst), |
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.
Do you have any usecase on your mind of having different deletionEviction & terminationEvictions rate-limitters? I mean with different parameters.
Currently, there is no way to have different values for them, so maybe they should have always the same values, and then we can pass those values once instead of twice.
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.
Done.
@gmarek - I think this PR requires release note. |
Changed the name of the PR so it's more release-note'y. @wojtek-t PTAL |
@@ -1175,7 +1243,8 @@ func TestCheckPod(t *testing.T) { | |||
}, | |||
} | |||
|
|||
nc := NewNodeController(nil, nil, 0, nil, nil, 0, 0, 0, nil, nil, 0, false) | |||
nc := NewNodeController(nil, nil, 0, 0, 0, | |||
0, 0, 0, nil, nil, 0, false) |
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.
nit: merge those two lines into 1 line
Very minor nits - lgtm after that. |
Fixed the nits. Applying lgtm. |
GCE e2e build/test passed for commit 5677a98. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 5677a98. |
Automatic merge from submit-queue |
Ref. #28832
NodeController needs to be able to separately adjust rate-limits for eviction for different zones. This PR splits rate limiters.
cc @davidopp