remove unused option deployment-controller-sync-period for deployment controller

This commit is contained in:
SataQiu 2022-03-30 20:00:53 +08:00
parent 2e55595d3b
commit 9ac1b4b68f
10 changed files with 3 additions and 38 deletions

View File

@ -496,7 +496,6 @@ API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,C
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,CronJobControllerConfiguration,ConcurrentCronJobSyncs
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DaemonSetControllerConfiguration,ConcurrentDaemonSetSyncs
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeploymentControllerConfiguration,ConcurrentDeploymentSyncs
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeploymentControllerConfiguration,DeploymentControllerSyncPeriod
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeprecatedControllerConfiguration,DeletingPodsBurst
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeprecatedControllerConfiguration,DeletingPodsQPS
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeprecatedControllerConfiguration,RegisterRetryCount

View File

@ -34,8 +34,6 @@ func (o *DeploymentControllerOptions) AddFlags(fs *pflag.FlagSet) {
}
fs.Int32Var(&o.ConcurrentDeploymentSyncs, "concurrent-deployment-syncs", o.ConcurrentDeploymentSyncs, "The number of deployment objects that are allowed to sync concurrently. Larger number = more responsive deployments, but more CPU (and network) load")
fs.DurationVar(&o.DeploymentControllerSyncPeriod.Duration, "deployment-controller-sync-period", o.DeploymentControllerSyncPeriod.Duration, "Period for syncing the deployments.")
fs.MarkDeprecated("deployment-controller-sync-period", "This flag is currently no-op and will be removed in v1.24.")
}
// ApplyTo fills up DeploymentController config with options.
@ -45,7 +43,6 @@ func (o *DeploymentControllerOptions) ApplyTo(cfg *deploymentconfig.DeploymentCo
}
cfg.ConcurrentDeploymentSyncs = o.ConcurrentDeploymentSyncs
cfg.DeploymentControllerSyncPeriod = o.DeploymentControllerSyncPeriod
return nil
}

View File

@ -97,7 +97,6 @@ var args = []string{
"--contention-profiling=true",
"--controller-start-interval=2m",
"--controllers=foo,bar",
"--deployment-controller-sync-period=45s",
"--disable-attach-detach-reconcile-sync=true",
"--enable-dynamic-provisioning=false",
"--enable-garbage-collector=false",
@ -258,8 +257,7 @@ func TestAddFlags(t *testing.T) {
},
DeploymentController: &DeploymentControllerOptions{
&deploymentconfig.DeploymentControllerConfiguration{
ConcurrentDeploymentSyncs: 10,
DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
ConcurrentDeploymentSyncs: 10,
},
},
StatefulSetController: &StatefulSetControllerOptions{
@ -531,8 +529,7 @@ func TestApplyTo(t *testing.T) {
ConcurrentDaemonSetSyncs: 2,
},
DeploymentController: deploymentconfig.DeploymentControllerConfiguration{
ConcurrentDeploymentSyncs: 10,
DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
ConcurrentDeploymentSyncs: 10,
},
StatefulSetController: statefulsetconfig.StatefulSetControllerConfiguration{
ConcurrentStatefulSetSyncs: 15,

View File

@ -16,16 +16,10 @@ limitations under the License.
package config
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DeploymentControllerConfiguration contains elements describing DeploymentController.
type DeploymentControllerConfiguration struct {
// concurrentDeploymentSyncs is the number of deployment objects that are
// allowed to sync concurrently. Larger number = more responsive deployments,
// but more CPU (and network) load.
ConcurrentDeploymentSyncs int32
// deploymentControllerSyncPeriod is the period for syncing the deployments.
DeploymentControllerSyncPeriod metav1.Duration
}

View File

@ -17,9 +17,6 @@ limitations under the License.
package v1alpha1
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
)
@ -33,11 +30,7 @@ import (
// be no easy way to opt-out. Instead, if you want to use this defaulting method
// run it in your wrapper struct of this type in its `SetDefaults_` method.
func RecommendedDefaultDeploymentControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.DeploymentControllerConfiguration) {
zero := metav1.Duration{}
if obj.ConcurrentDeploymentSyncs == 0 {
obj.ConcurrentDeploymentSyncs = 5
}
if obj.DeploymentControllerSyncPeriod == zero {
obj.DeploymentControllerSyncPeriod = metav1.Duration{Duration: 30 * time.Second}
}
}

View File

@ -61,13 +61,11 @@ func RegisterConversions(s *runtime.Scheme) error {
func autoConvert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(in *v1alpha1.DeploymentControllerConfiguration, out *config.DeploymentControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return nil
}
func autoConvert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in *config.DeploymentControllerConfiguration, out *v1alpha1.DeploymentControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return nil
}

View File

@ -24,7 +24,6 @@ package config
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
*out = *in
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return
}

View File

@ -48488,19 +48488,10 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerCo
Format: "int32",
},
},
"DeploymentControllerSyncPeriod": {
SchemaProps: spec.SchemaProps{
Description: "deploymentControllerSyncPeriod is the period for syncing the deployments.",
Default: 0,
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
},
},
},
Required: []string{"ConcurrentDeploymentSyncs", "DeploymentControllerSyncPeriod"},
Required: []string{"ConcurrentDeploymentSyncs"},
},
},
Dependencies: []string{
"k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
}
}

View File

@ -225,8 +225,6 @@ type DeploymentControllerConfiguration struct {
// allowed to sync concurrently. Larger number = more responsive deployments,
// but more CPU (and network) load.
ConcurrentDeploymentSyncs int32
// deploymentControllerSyncPeriod is the period for syncing the deployments.
DeploymentControllerSyncPeriod metav1.Duration
}
// StatefulSetControllerConfiguration contains elements describing StatefulSetController.

View File

@ -114,7 +114,6 @@ func (in *DaemonSetControllerConfiguration) DeepCopy() *DaemonSetControllerConfi
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
*out = *in
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return
}