Added Bind method to Scheduler Extender

- only one extender can support the bind method
- if an extender supports bind, scheduler delegates the pod binding to the extender
This commit is contained in:
Ravi Gadde
2017-04-24 15:34:28 -07:00
parent 0cff839317
commit 7f179bf936
13 changed files with 202 additions and 21 deletions

View File

@@ -72,3 +72,15 @@ func TestValidateExtenderWithNegativeWeight(t *testing.T) {
t.Errorf("Expected error about priority weight for extender not being positive")
}
}
func TestValidateMultipleExtendersWithBind(t *testing.T) {
extenderPolicy := api.Policy{
ExtenderConfigs: []api.ExtenderConfig{
{URLPrefix: "http://127.0.0.1:8081/extender", BindVerb: "bind"},
{URLPrefix: "http://127.0.0.1:8082/extender", BindVerb: "bind"},
},
}
if ValidatePolicy(extenderPolicy) == nil {
t.Errorf("Expected failure when multiple extenders with bind")
}
}