mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 03:03:40 +00:00
feat: add pod initial/max backoff duration to config API
This commit is contained in:
@@ -207,6 +207,8 @@ pluginConfig:
|
||||
|
||||
defaultSource := "DefaultProvider"
|
||||
defaultBindTimeoutSeconds := int64(600)
|
||||
defaultPodInitialBackoffSeconds := int64(1)
|
||||
defaultPodMaxBackoffSeconds := int64(10)
|
||||
|
||||
testcases := []struct {
|
||||
name string
|
||||
@@ -275,8 +277,10 @@ pluginConfig:
|
||||
Burst: 100,
|
||||
ContentType: "application/vnd.kubernetes.protobuf",
|
||||
},
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
Plugins: nil,
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
PodInitialBackoffSeconds: &defaultPodInitialBackoffSeconds,
|
||||
PodMaxBackoffSeconds: &defaultPodMaxBackoffSeconds,
|
||||
Plugins: nil,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -355,7 +359,9 @@ pluginConfig:
|
||||
Burst: 100,
|
||||
ContentType: "application/vnd.kubernetes.protobuf",
|
||||
},
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
PodInitialBackoffSeconds: &defaultPodInitialBackoffSeconds,
|
||||
PodMaxBackoffSeconds: &defaultPodMaxBackoffSeconds,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -416,7 +422,9 @@ pluginConfig:
|
||||
Burst: 100,
|
||||
ContentType: "application/vnd.kubernetes.protobuf",
|
||||
},
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
BindTimeoutSeconds: &defaultBindTimeoutSeconds,
|
||||
PodInitialBackoffSeconds: &defaultPodInitialBackoffSeconds,
|
||||
PodMaxBackoffSeconds: &defaultPodMaxBackoffSeconds,
|
||||
Plugins: &kubeschedulerconfig.Plugins{
|
||||
Reserve: &kubeschedulerconfig.PluginSet{
|
||||
Enabled: []kubeschedulerconfig.Plugin{
|
||||
|
@@ -190,6 +190,8 @@ func Run(cc schedulerserverconfig.CompletedConfig, stopCh <-chan struct{}, regis
|
||||
scheduler.WithFrameworkRegistry(registry),
|
||||
scheduler.WithFrameworkPlugins(cc.ComponentConfig.Plugins),
|
||||
scheduler.WithFrameworkPluginConfig(cc.ComponentConfig.PluginConfig),
|
||||
scheduler.WithPodMaxBackoffSeconds(*cc.ComponentConfig.PodMaxBackoffSeconds),
|
||||
scheduler.WithPodInitialBackoffSeconds(*cc.ComponentConfig.PodInitialBackoffSeconds),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user