Merge pull request #109612 from pandaamanda/remove_DeprecatedControllerOptions

refactor: remove deprecated `deleting-pods-qps` `deleting-pods-burst` `register-retry-count`  flags
This commit is contained in:
Kubernetes Prow Robot
2022-05-04 02:34:54 -07:00
committed by GitHub
8 changed files with 2 additions and 78 deletions

View File

@@ -33,14 +33,6 @@ func (o *DeprecatedControllerOptions) AddFlags(fs *pflag.FlagSet) {
if o == nil {
return
}
fs.Float32Var(&o.DeletingPodsQPS, "deleting-pods-qps", 0.1, "Number of nodes per second on which pods are deleted in case of node failure.")
fs.MarkDeprecated("deleting-pods-qps", "This flag is currently no-op and will be deleted.")
fs.Int32Var(&o.DeletingPodsBurst, "deleting-pods-burst", 0, "Number of nodes on which pods are bursty deleted in case of node failure. For more details look into RateLimiter.")
fs.MarkDeprecated("deleting-pods-burst", "This flag is currently no-op and will be deleted.")
fs.Int32Var(&o.RegisterRetryCount, "register-retry-count", o.RegisterRetryCount, ""+
"The number of retries for initial node registration. Retry interval equals node-sync-period.")
fs.MarkDeprecated("register-retry-count", "This flag is currently no-op and will be deleted.")
}
// ApplyTo fills up DeprecatedController config with options.
@@ -49,10 +41,6 @@ func (o *DeprecatedControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DeprecatedC
return nil
}
cfg.DeletingPodsQPS = o.DeletingPodsQPS
cfg.DeletingPodsBurst = o.DeletingPodsBurst
cfg.RegisterRetryCount = o.RegisterRetryCount
return nil
}

View File

@@ -266,10 +266,7 @@ func TestAddFlags(t *testing.T) {
},
},
DeprecatedFlags: &DeprecatedControllerOptions{
&kubectrlmgrconfig.DeprecatedControllerConfiguration{
DeletingPodsQPS: 0.1,
RegisterRetryCount: 10,
},
&kubectrlmgrconfig.DeprecatedControllerConfiguration{},
},
EndpointController: &EndpointControllerOptions{
&endpointconfig.EndpointControllerConfiguration{
@@ -534,10 +531,7 @@ func TestApplyTo(t *testing.T) {
StatefulSetController: statefulsetconfig.StatefulSetControllerConfiguration{
ConcurrentStatefulSetSyncs: 15,
},
DeprecatedController: kubectrlmgrconfig.DeprecatedControllerConfiguration{
DeletingPodsQPS: 0.1,
RegisterRetryCount: 10,
},
DeprecatedController: kubectrlmgrconfig.DeprecatedControllerConfiguration{},
EndpointController: endpointconfig.EndpointControllerConfiguration{
ConcurrentEndpointSyncs: 10,
},