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

@@ -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
}