-
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
Added rate limiting to pod deleting #6355
Conversation
@@ -177,7 +177,7 @@ func (s *CMServer) Run(_ []string) error { | |||
} | |||
|
|||
nodeController := nodeControllerPkg.NewNodeController(cloud, s.MinionRegexp, s.MachineList, nodeResources, | |||
kubeClient, kubeletClient, s.RegisterRetryCount, s.PodEvictionTimeout) | |||
kubeClient, kubeletClient, s.RegisterRetryCount, s.PodEvictionTimeout, util.NewTokenBucketRateLimiter(0.01, 10)) |
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.
Can you make them flags here too?
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
LGTM, modulo the flags comment. If you get to it tonight, that's great. Otherwise, I'll merge later today and we can handle the flags as a follow on PR. |
I'll do in 3 hours. |
Can you please wait to merge until I've taken a look? I'll do it today. |
Could you please wait for David? |
yes, will wait. --brendan |
@@ -104,6 +106,8 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) { | |||
fs.DurationVar(&s.ResourceQuotaSyncPeriod, "resource_quota_sync_period", s.ResourceQuotaSyncPeriod, "The period for syncing quota usage status in the system") | |||
fs.DurationVar(&s.NamespaceSyncPeriod, "namespace_sync_period", s.NamespaceSyncPeriod, "The period for syncing namespace life-cycle updates") | |||
fs.DurationVar(&s.PodEvictionTimeout, "pod_eviction_timeout", s.PodEvictionTimeout, "The grace peroid for deleting pods on failed nodes.") | |||
fs.Float32Var(&s.DeletingPodsQps, "deleting_pods_qps", 0.1, "Number of nodes per second on which pods are deleted in case of node failure.") | |||
fs.IntVar(&s.DeletingPodsBurst, "deleting_pods_burst", 10, "Number of nodes on which pods are bursty deleted in case of node failure.") |
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.
Maybe define what "bursty deleted" means.
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.
Added note pointing to RateLimiter.
LGTM |
Rebased. |
Travis failure is a known race for which fix required this PR. Thanks, merging. |
Added rate limiting to pod deleting in NodeController.
Fixes #6228