feat: add pod initial/max backoff duration to config API

This commit is contained in:
draveness
2019-08-11 18:26:32 -06:00
parent e62ed95ecd
commit 9646afb1f5
16 changed files with 211 additions and 24 deletions

View File

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

View File

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