Remove BindTimeoutSeconds from KubeSchedulerConfiguration
This commit is contained in:
@@ -478,7 +478,6 @@ profiles:
|
||||
},
|
||||
},
|
||||
want: `apiVersion: kubescheduler.config.k8s.io/v1beta1
|
||||
bindTimeoutSeconds: 0
|
||||
clientConnection:
|
||||
acceptContentTypes: ""
|
||||
burst: 0
|
||||
|
@@ -1617,15 +1617,6 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
|
||||
"PostBindPlugin": {{Name: "VolumeBinding"}},
|
||||
}
|
||||
|
||||
defaultPluginConfigs := []config.PluginConfig{
|
||||
{
|
||||
Name: "VolumeBinding",
|
||||
Args: &config.VolumeBindingArgs{
|
||||
BindTimeoutSeconds: 600,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
testcases := []struct {
|
||||
name string
|
||||
plugins config.Plugins
|
||||
@@ -1636,7 +1627,7 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
|
||||
{
|
||||
name: "default plugins",
|
||||
wantPlugins: defaultPlugins,
|
||||
wantPluginConfig: defaultPluginConfigs,
|
||||
wantPluginConfig: nil,
|
||||
},
|
||||
{
|
||||
name: "default plugins with customized plugin config",
|
||||
@@ -1967,7 +1958,7 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
|
||||
"BindPlugin": {{Name: "DefaultBinder"}},
|
||||
"PostBindPlugin": {{Name: "VolumeBinding"}},
|
||||
},
|
||||
wantPluginConfig: defaultPluginConfigs,
|
||||
wantPluginConfig: nil,
|
||||
},
|
||||
}
|
||||
for _, tc := range testcases {
|
||||
|
@@ -90,13 +90,6 @@ type KubeSchedulerConfiguration struct {
|
||||
// nodes will be scored.
|
||||
PercentageOfNodesToScore int32
|
||||
|
||||
// BindTimeoutSeconds is the timeout in seconds in volume binding operation.
|
||||
// Value must be non-negative integer. The value zero indicates no waiting.
|
||||
// If this value is nil, the default value will be used.
|
||||
// DEPRECATED: BindTimeoutSeconds in deprecated.
|
||||
// TODO(#90958) Remove this and the versioned counterparts in future API versions.
|
||||
BindTimeoutSeconds int64
|
||||
|
||||
// PodInitialBackoffSeconds is the initial backoff for unschedulable pods.
|
||||
// If specified, it must be greater than 0. If this value is null, the default value (1s)
|
||||
// will be used.
|
||||
|
@@ -135,11 +135,6 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1beta1.KubeSchedulerConfigurat
|
||||
// Use the default LeaderElectionConfiguration options
|
||||
componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection)
|
||||
|
||||
if obj.BindTimeoutSeconds == nil {
|
||||
val := int64(600)
|
||||
obj.BindTimeoutSeconds = &val
|
||||
}
|
||||
|
||||
if obj.PodInitialBackoffSeconds == nil {
|
||||
val := int64(1)
|
||||
obj.PodInitialBackoffSeconds = &val
|
||||
|
@@ -62,7 +62,6 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
},
|
||||
DisablePreemption: pointer.BoolPtr(false),
|
||||
PercentageOfNodesToScore: pointer.Int32Ptr(0),
|
||||
BindTimeoutSeconds: pointer.Int64Ptr(600),
|
||||
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
|
||||
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
|
||||
Profiles: []v1beta1.KubeSchedulerProfile{
|
||||
@@ -104,7 +103,6 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
},
|
||||
DisablePreemption: pointer.BoolPtr(false),
|
||||
PercentageOfNodesToScore: pointer.Int32Ptr(0),
|
||||
BindTimeoutSeconds: pointer.Int64Ptr(600),
|
||||
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
|
||||
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
|
||||
Profiles: []v1beta1.KubeSchedulerProfile{
|
||||
@@ -161,7 +159,6 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
},
|
||||
DisablePreemption: pointer.BoolPtr(false),
|
||||
PercentageOfNodesToScore: pointer.Int32Ptr(0),
|
||||
BindTimeoutSeconds: pointer.Int64Ptr(600),
|
||||
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
|
||||
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
|
||||
Profiles: []v1beta1.KubeSchedulerProfile{
|
||||
@@ -212,7 +209,6 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
},
|
||||
DisablePreemption: pointer.BoolPtr(false),
|
||||
PercentageOfNodesToScore: pointer.Int32Ptr(0),
|
||||
BindTimeoutSeconds: pointer.Int64Ptr(600),
|
||||
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
|
||||
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
|
||||
Profiles: []v1beta1.KubeSchedulerProfile{
|
||||
@@ -249,7 +245,6 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
},
|
||||
DisablePreemption: pointer.BoolPtr(false),
|
||||
PercentageOfNodesToScore: pointer.Int32Ptr(0),
|
||||
BindTimeoutSeconds: pointer.Int64Ptr(600),
|
||||
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
|
||||
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
|
||||
Profiles: []v1beta1.KubeSchedulerProfile{
|
||||
|
@@ -28,7 +28,6 @@ import (
|
||||
)
|
||||
|
||||
func TestValidateKubeSchedulerConfiguration(t *testing.T) {
|
||||
testTimeout := int64(0)
|
||||
podInitialBackoffSeconds := int64(1)
|
||||
podMaxBackoffSeconds := int64(1)
|
||||
validConfig := &config.KubeSchedulerConfiguration{
|
||||
@@ -59,7 +58,6 @@ func TestValidateKubeSchedulerConfiguration(t *testing.T) {
|
||||
},
|
||||
PodInitialBackoffSeconds: podInitialBackoffSeconds,
|
||||
PodMaxBackoffSeconds: podMaxBackoffSeconds,
|
||||
BindTimeoutSeconds: testTimeout,
|
||||
PercentageOfNodesToScore: 35,
|
||||
Profiles: []config.KubeSchedulerProfile{
|
||||
{
|
||||
|
Reference in New Issue
Block a user