Skip to content
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

Merged
merged 1 commit into from
Jul 13, 2016

Conversation

gmarek
Copy link
Contributor

@gmarek gmarek commented Jul 12, 2016

Ref. #28832

NodeController needs to be able to separately adjust rate-limits for eviction for different zones. This PR splits rate limiters.

cc @davidopp

@gmarek gmarek added this to the v1.4 milestone Jul 12, 2016
@k8s-github-robot k8s-github-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. release-note-label-needed labels Jul 12, 2016
@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 12, 2016
@@ -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),
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@wojtek-t
Copy link
Member

@gmarek - I think this PR requires release note.

@gmarek gmarek added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Jul 13, 2016
@gmarek gmarek changed the title Split NodeController rate limiters between zones NodeController has separate rate limiters for Pod evictions for different zones Jul 13, 2016
@gmarek gmarek changed the title NodeController has separate rate limiters for Pod evictions for different zones Separate rate limiters for Pod evictions for different zones in NodeController Jul 13, 2016
@gmarek
Copy link
Contributor Author

gmarek commented Jul 13, 2016

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)
Copy link
Member

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

@wojtek-t
Copy link
Member

Very minor nits - lgtm after that.

@gmarek
Copy link
Contributor Author

gmarek commented Jul 13, 2016

Fixed the nits. Applying lgtm.

@gmarek gmarek added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 13, 2016
@k8s-bot
Copy link

k8s-bot commented Jul 13, 2016

GCE e2e build/test passed for commit 5677a98.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jul 13, 2016

GCE e2e build/test passed for commit 5677a98.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 7e6a856 into kubernetes:master Jul 13, 2016
@gmarek gmarek deleted the limiterPerZone branch August 30, 2016 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants