summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contributors/design-proposals/scheduler_extender.md36
1 files changed, 28 insertions, 8 deletions
diff --git a/contributors/design-proposals/scheduler_extender.md b/contributors/design-proposals/scheduler_extender.md
index 1f362242..ff7b23ca 100644
--- a/contributors/design-proposals/scheduler_extender.md
+++ b/contributors/design-proposals/scheduler_extender.md
@@ -17,9 +17,12 @@ mutually exclusive.)
When scheduling a pod, the extender allows an external process to filter and
prioritize nodes. Two separate http/https calls are issued to the extender, one
-for "filter" and one for "prioritize" actions. To use the extender, you must
-create a scheduler policy configuration file. The configuration specifies how to
-reach the extender, whether to use http or https and the timeout.
+for "filter" and one for "prioritize" actions. Additionally, the extender can
+choose to bind the pod to apiserver by implementing the "bind" action.
+
+To use the extender, you must create a scheduler policy configuration file. The
+configuration specifies how to reach the extender, whether to use http or https
+and the timeout.
```go
// Holds the parameters used to communicate with the extender. If a verb is unspecified/empty,
@@ -31,6 +34,9 @@ type ExtenderConfig struct {
FilterVerb string `json:"filterVerb,omitempty"`
// Verb for the prioritize call, empty if not supported. This verb is appended to the URLPrefix when issuing the prioritize call to extender.
PrioritizeVerb string `json:"prioritizeVerb,omitempty"`
+ // Verb for the bind call, empty if not supported. This verb is appended to the URLPrefix when issuing the bind call to extender.
+ // If this method is implemented by the extender, it is the extender's responsibility to bind the pod to apiserver.
+ BindVerb string `json:"bindVerb,omitempty"`
// The numeric multiplier for the node scores that the prioritize call generates.
// The weight should be a positive integer
Weight int `json:"weight,omitempty"`
@@ -39,7 +45,7 @@ type ExtenderConfig struct {
// TLSConfig specifies the transport layer security config
TLSConfig *client.TLSClientConfig `json:"tlsConfig,omitempty"`
// HTTPTimeout specifies the timeout duration for a call to the extender. Filter timeout fails the scheduling of the pod. Prioritize
- // timeout is ignored, k8s/other extenders priorities are used to select the node.
+ // timeout is ignored, k8s priorities are used to select the node.
HTTPTimeout time.Duration `json:"httpTimeout,omitempty"`
}
```
@@ -65,13 +71,12 @@ A sample scheduler policy file with extender configuration:
"weight": 1
}
],
- "extenders": [
+ "extender":
{
"urlPrefix": "http://127.0.0.1:12345/api/scheduler",
"filterVerb": "filter",
"enableHttps": false
}
- ]
}
```
@@ -98,8 +103,23 @@ The "filter" call may prune the set of nodes based on its predicates. Scores
returned by the "prioritize" call are added to the k8s scores (computed through
its priority functions) and used for final host selection.
-Multiple extenders can be configured in the scheduler policy.
-
+"bind" call is used to delegate the bind of a pod to a node to the extender. It can
+be optionally implemented by the extender. When it is implemented, it is the extender's
+responbility to issue the bind call to the apiserver. Pod name, namespace, UID and Node
+name are passed to the extender.
+```go
+// Binding represents the binding of a pod to a node.
+type Binding struct {
+ // PodName is the name of the pod being bound
+ PodName string
+ // PodNamespace is the namespace of the pod being bound
+ PodNamespace string
+ // PodUID is the UID of the pod being bound
+ PodUID types.UID
+ // Node selected by the scheduler
+ Node string
+}
+```
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/design/scheduler_extender.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->