Skip to content

Commit 4e3dea8

Browse files
authored
Merge pull request kubernetes#91580 from cofyc/fix90958
Remove KubeSchedulerConfiguration.BindTimeoutSeconds
2 parents 46afcb7 + 1ff09c0 commit 4e3dea8

File tree

18 files changed

+26
-245
lines changed

18 files changed

+26
-245
lines changed

cmd/kube-scheduler/app/options/options_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ profiles:
247247
}
248248

249249
defaultSource := "DefaultProvider"
250-
defaultBindTimeoutSeconds := int64(600)
251250
defaultPodInitialBackoffSeconds := int64(1)
252251
defaultPodMaxBackoffSeconds := int64(10)
253252
defaultPercentageOfNodesToScore := int32(0)
@@ -320,7 +319,6 @@ profiles:
320319
ContentType: "application/vnd.kubernetes.protobuf",
321320
},
322321
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
323-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
324322
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
325323
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
326324
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -410,7 +408,6 @@ profiles:
410408
ContentType: "application/vnd.kubernetes.protobuf",
411409
},
412410
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
413-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
414411
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
415412
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
416413
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -474,7 +471,6 @@ profiles:
474471
ContentType: "application/vnd.kubernetes.protobuf",
475472
},
476473
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
477-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
478474
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
479475
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
480476
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -513,7 +509,6 @@ profiles:
513509
ContentType: "application/vnd.kubernetes.protobuf",
514510
},
515511
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
516-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
517512
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
518513
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
519514
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -587,7 +582,6 @@ profiles:
587582
ContentType: "application/vnd.kubernetes.protobuf",
588583
},
589584
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
590-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
591585
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
592586
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
593587
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -659,7 +653,6 @@ profiles:
659653
ContentType: "application/vnd.kubernetes.protobuf",
660654
},
661655
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
662-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
663656
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
664657
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
665658
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
@@ -711,7 +704,6 @@ profiles:
711704
ContentType: "application/vnd.kubernetes.protobuf",
712705
},
713706
PercentageOfNodesToScore: defaultPercentageOfNodesToScore,
714-
BindTimeoutSeconds: defaultBindTimeoutSeconds,
715707
PodInitialBackoffSeconds: defaultPodInitialBackoffSeconds,
716708
PodMaxBackoffSeconds: defaultPodMaxBackoffSeconds,
717709
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{

cmd/kube-scheduler/app/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ func Setup(ctx context.Context, opts *options.Options, outOfTreeRegistryOptions
337337
scheduler.WithAlgorithmSource(cc.ComponentConfig.AlgorithmSource),
338338
scheduler.WithPreemptionDisabled(cc.ComponentConfig.DisablePreemption),
339339
scheduler.WithPercentageOfNodesToScore(cc.ComponentConfig.PercentageOfNodesToScore),
340-
scheduler.WithBindTimeoutSeconds(cc.ComponentConfig.BindTimeoutSeconds),
341340
scheduler.WithFrameworkOutOfTreeRegistry(outOfTreeRegistry),
342341
scheduler.WithPodMaxBackoffSeconds(cc.ComponentConfig.PodMaxBackoffSeconds),
343342
scheduler.WithPodInitialBackoffSeconds(cc.ComponentConfig.PodInitialBackoffSeconds),

pkg/scheduler/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ go_library(
2121
"//pkg/scheduler/framework/plugins/defaultbinder:go_default_library",
2222
"//pkg/scheduler/framework/plugins/noderesources:go_default_library",
2323
"//pkg/scheduler/framework/plugins/queuesort:go_default_library",
24-
"//pkg/scheduler/framework/plugins/volumebinding:go_default_library",
2524
"//pkg/scheduler/framework/v1alpha1:go_default_library",
2625
"//pkg/scheduler/internal/cache:go_default_library",
2726
"//pkg/scheduler/internal/cache/debugger:go_default_library",

pkg/scheduler/apis/config/scheme/scheme_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ profiles:
478478
},
479479
},
480480
want: `apiVersion: kubescheduler.config.k8s.io/v1beta1
481-
bindTimeoutSeconds: 0
482481
clientConnection:
483482
acceptContentTypes: ""
484483
burst: 0

pkg/scheduler/apis/config/testing/compatibility_test.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,15 +1616,6 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
16161616
"PostBindPlugin": {{Name: "VolumeBinding"}},
16171617
}
16181618

1619-
defaultPluginConfigs := []config.PluginConfig{
1620-
{
1621-
Name: "VolumeBinding",
1622-
Args: &config.VolumeBindingArgs{
1623-
BindTimeoutSeconds: 600,
1624-
},
1625-
},
1626-
}
1627-
16281619
testcases := []struct {
16291620
name string
16301621
plugins config.Plugins
@@ -1635,7 +1626,7 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
16351626
{
16361627
name: "default plugins",
16371628
wantPlugins: defaultPlugins,
1638-
wantPluginConfig: defaultPluginConfigs,
1629+
wantPluginConfig: nil,
16391630
},
16401631
{
16411632
name: "default plugins with customized plugin config",
@@ -1966,7 +1957,7 @@ func TestPluginsConfigurationCompatibility(t *testing.T) {
19661957
"BindPlugin": {{Name: "DefaultBinder"}},
19671958
"PostBindPlugin": {{Name: "VolumeBinding"}},
19681959
},
1969-
wantPluginConfig: defaultPluginConfigs,
1960+
wantPluginConfig: nil,
19701961
},
19711962
}
19721963
for _, tc := range testcases {

pkg/scheduler/apis/config/types.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ type KubeSchedulerConfiguration struct {
9090
// nodes will be scored.
9191
PercentageOfNodesToScore int32
9292

93-
// BindTimeoutSeconds is the timeout in seconds in volume binding operation.
94-
// Value must be non-negative integer. The value zero indicates no waiting.
95-
// If this value is nil, the default value will be used.
96-
// DEPRECATED: BindTimeoutSeconds in deprecated.
97-
// TODO(#90958) Remove this and the versioned counterparts in future API versions.
98-
BindTimeoutSeconds int64
99-
10093
// PodInitialBackoffSeconds is the initial backoff for unschedulable pods.
10194
// If specified, it must be greater than 0. If this value is null, the default value (1s)
10295
// will be used.

pkg/scheduler/apis/config/v1beta1/defaults.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ func SetDefaults_KubeSchedulerConfiguration(obj *v1beta1.KubeSchedulerConfigurat
135135
// Use the default LeaderElectionConfiguration options
136136
componentbaseconfigv1alpha1.RecommendedDefaultLeaderElectionConfiguration(&obj.LeaderElection)
137137

138-
if obj.BindTimeoutSeconds == nil {
139-
val := int64(600)
140-
obj.BindTimeoutSeconds = &val
141-
}
142-
143138
if obj.PodInitialBackoffSeconds == nil {
144139
val := int64(1)
145140
obj.PodInitialBackoffSeconds = &val

pkg/scheduler/apis/config/v1beta1/defaults_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ func TestSchedulerDefaults(t *testing.T) {
6262
},
6363
DisablePreemption: pointer.BoolPtr(false),
6464
PercentageOfNodesToScore: pointer.Int32Ptr(0),
65-
BindTimeoutSeconds: pointer.Int64Ptr(600),
6665
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
6766
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
6867
Profiles: []v1beta1.KubeSchedulerProfile{
@@ -104,7 +103,6 @@ func TestSchedulerDefaults(t *testing.T) {
104103
},
105104
DisablePreemption: pointer.BoolPtr(false),
106105
PercentageOfNodesToScore: pointer.Int32Ptr(0),
107-
BindTimeoutSeconds: pointer.Int64Ptr(600),
108106
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
109107
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
110108
Profiles: []v1beta1.KubeSchedulerProfile{
@@ -161,7 +159,6 @@ func TestSchedulerDefaults(t *testing.T) {
161159
},
162160
DisablePreemption: pointer.BoolPtr(false),
163161
PercentageOfNodesToScore: pointer.Int32Ptr(0),
164-
BindTimeoutSeconds: pointer.Int64Ptr(600),
165162
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
166163
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
167164
Profiles: []v1beta1.KubeSchedulerProfile{
@@ -212,7 +209,6 @@ func TestSchedulerDefaults(t *testing.T) {
212209
},
213210
DisablePreemption: pointer.BoolPtr(false),
214211
PercentageOfNodesToScore: pointer.Int32Ptr(0),
215-
BindTimeoutSeconds: pointer.Int64Ptr(600),
216212
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
217213
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
218214
Profiles: []v1beta1.KubeSchedulerProfile{
@@ -249,7 +245,6 @@ func TestSchedulerDefaults(t *testing.T) {
249245
},
250246
DisablePreemption: pointer.BoolPtr(false),
251247
PercentageOfNodesToScore: pointer.Int32Ptr(0),
252-
BindTimeoutSeconds: pointer.Int64Ptr(600),
253248
PodInitialBackoffSeconds: pointer.Int64Ptr(1),
254249
PodMaxBackoffSeconds: pointer.Int64Ptr(10),
255250
Profiles: []v1beta1.KubeSchedulerProfile{

pkg/scheduler/apis/config/v1beta1/zz_generated.conversion.go

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/scheduler/apis/config/validation/validation_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import (
2828
)
2929

3030
func TestValidateKubeSchedulerConfiguration(t *testing.T) {
31-
testTimeout := int64(0)
3231
podInitialBackoffSeconds := int64(1)
3332
podMaxBackoffSeconds := int64(1)
3433
validConfig := &config.KubeSchedulerConfiguration{
@@ -59,7 +58,6 @@ func TestValidateKubeSchedulerConfiguration(t *testing.T) {
5958
},
6059
PodInitialBackoffSeconds: podInitialBackoffSeconds,
6160
PodMaxBackoffSeconds: podMaxBackoffSeconds,
62-
BindTimeoutSeconds: testTimeout,
6361
PercentageOfNodesToScore: 35,
6462
Profiles: []config.KubeSchedulerProfile{
6563
{

0 commit comments

Comments
 (0)