mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 18:31:15 +00:00
Merge pull request #107178 from SataQiu/deprecated-20211222
kube-controller-manager: remove unused option deployment-controller-sync-period for deployment controller
This commit is contained in:
commit
14cc997d03
@ -498,7 +498,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,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,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,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,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,DeletingPodsQPS
|
||||||
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeprecatedControllerConfiguration,RegisterRetryCount
|
API rule violation: names_match,k8s.io/kube-controller-manager/config/v1alpha1,DeprecatedControllerConfiguration,RegisterRetryCount
|
||||||
|
@ -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.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.
|
// ApplyTo fills up DeploymentController config with options.
|
||||||
@ -45,7 +43,6 @@ func (o *DeploymentControllerOptions) ApplyTo(cfg *deploymentconfig.DeploymentCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
cfg.ConcurrentDeploymentSyncs = o.ConcurrentDeploymentSyncs
|
cfg.ConcurrentDeploymentSyncs = o.ConcurrentDeploymentSyncs
|
||||||
cfg.DeploymentControllerSyncPeriod = o.DeploymentControllerSyncPeriod
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,6 @@ var args = []string{
|
|||||||
"--contention-profiling=true",
|
"--contention-profiling=true",
|
||||||
"--controller-start-interval=2m",
|
"--controller-start-interval=2m",
|
||||||
"--controllers=foo,bar",
|
"--controllers=foo,bar",
|
||||||
"--deployment-controller-sync-period=45s",
|
|
||||||
"--disable-attach-detach-reconcile-sync=true",
|
"--disable-attach-detach-reconcile-sync=true",
|
||||||
"--enable-dynamic-provisioning=false",
|
"--enable-dynamic-provisioning=false",
|
||||||
"--enable-garbage-collector=false",
|
"--enable-garbage-collector=false",
|
||||||
@ -258,8 +257,7 @@ func TestAddFlags(t *testing.T) {
|
|||||||
},
|
},
|
||||||
DeploymentController: &DeploymentControllerOptions{
|
DeploymentController: &DeploymentControllerOptions{
|
||||||
&deploymentconfig.DeploymentControllerConfiguration{
|
&deploymentconfig.DeploymentControllerConfiguration{
|
||||||
ConcurrentDeploymentSyncs: 10,
|
ConcurrentDeploymentSyncs: 10,
|
||||||
DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
StatefulSetController: &StatefulSetControllerOptions{
|
StatefulSetController: &StatefulSetControllerOptions{
|
||||||
@ -531,8 +529,7 @@ func TestApplyTo(t *testing.T) {
|
|||||||
ConcurrentDaemonSetSyncs: 2,
|
ConcurrentDaemonSetSyncs: 2,
|
||||||
},
|
},
|
||||||
DeploymentController: deploymentconfig.DeploymentControllerConfiguration{
|
DeploymentController: deploymentconfig.DeploymentControllerConfiguration{
|
||||||
ConcurrentDeploymentSyncs: 10,
|
ConcurrentDeploymentSyncs: 10,
|
||||||
DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
|
|
||||||
},
|
},
|
||||||
StatefulSetController: statefulsetconfig.StatefulSetControllerConfiguration{
|
StatefulSetController: statefulsetconfig.StatefulSetControllerConfiguration{
|
||||||
ConcurrentStatefulSetSyncs: 15,
|
ConcurrentStatefulSetSyncs: 15,
|
||||||
|
@ -16,16 +16,10 @@ limitations under the License.
|
|||||||
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
// DeploymentControllerConfiguration contains elements describing DeploymentController.
|
// DeploymentControllerConfiguration contains elements describing DeploymentController.
|
||||||
type DeploymentControllerConfiguration struct {
|
type DeploymentControllerConfiguration struct {
|
||||||
// concurrentDeploymentSyncs is the number of deployment objects that are
|
// concurrentDeploymentSyncs is the number of deployment objects that are
|
||||||
// allowed to sync concurrently. Larger number = more responsive deployments,
|
// allowed to sync concurrently. Larger number = more responsive deployments,
|
||||||
// but more CPU (and network) load.
|
// but more CPU (and network) load.
|
||||||
ConcurrentDeploymentSyncs int32
|
ConcurrentDeploymentSyncs int32
|
||||||
// deploymentControllerSyncPeriod is the period for syncing the deployments.
|
|
||||||
DeploymentControllerSyncPeriod metav1.Duration
|
|
||||||
}
|
}
|
||||||
|
@ -17,9 +17,6 @@ limitations under the License.
|
|||||||
package v1alpha1
|
package v1alpha1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
|
||||||
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
||||||
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
|
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
|
// 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.
|
// run it in your wrapper struct of this type in its `SetDefaults_` method.
|
||||||
func RecommendedDefaultDeploymentControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.DeploymentControllerConfiguration) {
|
func RecommendedDefaultDeploymentControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.DeploymentControllerConfiguration) {
|
||||||
zero := metav1.Duration{}
|
|
||||||
if obj.ConcurrentDeploymentSyncs == 0 {
|
if obj.ConcurrentDeploymentSyncs == 0 {
|
||||||
obj.ConcurrentDeploymentSyncs = 5
|
obj.ConcurrentDeploymentSyncs = 5
|
||||||
}
|
}
|
||||||
if obj.DeploymentControllerSyncPeriod == zero {
|
|
||||||
obj.DeploymentControllerSyncPeriod = metav1.Duration{Duration: 30 * time.Second}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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 {
|
func autoConvert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(in *v1alpha1.DeploymentControllerConfiguration, out *config.DeploymentControllerConfiguration, s conversion.Scope) error {
|
||||||
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
|
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
|
||||||
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func autoConvert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in *config.DeploymentControllerConfiguration, out *v1alpha1.DeploymentControllerConfiguration, s conversion.Scope) error {
|
func autoConvert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in *config.DeploymentControllerConfiguration, out *v1alpha1.DeploymentControllerConfiguration, s conversion.Scope) error {
|
||||||
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
|
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
|
||||||
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ package config
|
|||||||
// 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 *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
|
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
pkg/generated/openapi/zz_generated.openapi.go
generated
11
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -48607,19 +48607,10 @@ func schema_k8sio_kube_controller_manager_config_v1alpha1_DeploymentControllerCo
|
|||||||
Format: "int32",
|
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"},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,8 +225,6 @@ type DeploymentControllerConfiguration struct {
|
|||||||
// allowed to sync concurrently. Larger number = more responsive deployments,
|
// allowed to sync concurrently. Larger number = more responsive deployments,
|
||||||
// but more CPU (and network) load.
|
// but more CPU (and network) load.
|
||||||
ConcurrentDeploymentSyncs int32
|
ConcurrentDeploymentSyncs int32
|
||||||
// deploymentControllerSyncPeriod is the period for syncing the deployments.
|
|
||||||
DeploymentControllerSyncPeriod metav1.Duration
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StatefulSetControllerConfiguration contains elements describing StatefulSetController.
|
// StatefulSetControllerConfiguration contains elements describing StatefulSetController.
|
||||||
|
@ -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.
|
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||||
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
|
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
|
||||||
*out = *in
|
*out = *in
|
||||||
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user