add flag concurrent-statefulset-syncs to kube-controller-manager (#79169)

* add flag `concurrent-statefulset-syncs` to set number of concurrent workers for statefulset controller

* change default value of ConcurrentStatefulSetSyncs from 1 to 5

* 1. fix doc comment of statefulset config types.go
2. add missing deps k8s.io/kubernetes/pkg/controller/statefulset/config

* add missing dep k8s.io/kubernetes/pkg/controller/statefulset/config/v1alpha1

* updated bazel BUILD files

* update kube-controller-manager options testcase

* fix codegen

* fix golint error

* fix testcase

Kubernetes-commit: d29f1944746f2453f48fefe6a4ae6aa626acef29
This commit is contained in:
YueHonghui 2019-08-01 13:36:14 +08:00 committed by Kubernetes Publisher
parent 5229c41e9b
commit 9f42e95dd9
2 changed files with 28 additions and 0 deletions

View File

@ -102,6 +102,9 @@ type KubeControllerManagerConfiguration struct {
// DeploymentControllerConfiguration holds configuration for // DeploymentControllerConfiguration holds configuration for
// DeploymentController related features. // DeploymentController related features.
DeploymentController DeploymentControllerConfiguration DeploymentController DeploymentControllerConfiguration
// StatefulSetControllerConfiguration holds configuration for
// StatefulSetController related features.
StatefulSetController StatefulSetControllerConfiguration
// DeprecatedControllerConfiguration holds configuration for some deprecated // DeprecatedControllerConfiguration holds configuration for some deprecated
// features. // features.
DeprecatedController DeprecatedControllerConfiguration DeprecatedController DeprecatedControllerConfiguration
@ -260,6 +263,14 @@ type DeploymentControllerConfiguration struct {
DeploymentControllerSyncPeriod metav1.Duration DeploymentControllerSyncPeriod metav1.Duration
} }
// StatefulSetControllerConfiguration contains elements describing StatefulSetController.
type StatefulSetControllerConfiguration struct {
// concurrentStatefulSetSyncs is the number of statefulset objects that are
// allowed to sync concurrently. Larger number = more responsive statefulsets,
// but more CPU (and network) load.
ConcurrentStatefulSetSyncs int32
}
// DeprecatedControllerConfiguration contains elements be deprecated. // DeprecatedControllerConfiguration contains elements be deprecated.
type DeprecatedControllerConfiguration struct { type DeprecatedControllerConfiguration struct {
// DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in // DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in

View File

@ -286,6 +286,7 @@ func (in *KubeControllerManagerConfiguration) DeepCopyInto(out *KubeControllerMa
out.CSRSigningController = in.CSRSigningController out.CSRSigningController = in.CSRSigningController
out.DaemonSetController = in.DaemonSetController out.DaemonSetController = in.DaemonSetController
out.DeploymentController = in.DeploymentController out.DeploymentController = in.DeploymentController
out.StatefulSetController = in.StatefulSetController
out.DeprecatedController = in.DeprecatedController out.DeprecatedController = in.DeprecatedController
out.EndpointController = in.EndpointController out.EndpointController = in.EndpointController
in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController) in.GarbageCollectorController.DeepCopyInto(&out.GarbageCollectorController)
@ -511,6 +512,22 @@ func (in *ServiceControllerConfiguration) DeepCopy() *ServiceControllerConfigura
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatefulSetControllerConfiguration) DeepCopyInto(out *StatefulSetControllerConfiguration) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetControllerConfiguration.
func (in *StatefulSetControllerConfiguration) DeepCopy() *StatefulSetControllerConfiguration {
if in == nil {
return nil
}
out := new(StatefulSetControllerConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TTLAfterFinishedControllerConfiguration) DeepCopyInto(out *TTLAfterFinishedControllerConfiguration) { func (in *TTLAfterFinishedControllerConfiguration) DeepCopyInto(out *TTLAfterFinishedControllerConfiguration) {
*out = *in *out = *in