New scheduler API

This commit adds a Binding object. The idea is that schedulers can write
these to cause pods to be asssigned to hosts. I'll provide an implementation
along with a rudimentary scheduler plugin.

This continues k8s' tradition of phrasing all APIs as RESTful handlers.
This commit is contained in:
Daniel Smith
2014-07-23 16:09:37 -07:00
parent e35dfedd79
commit 7d605467dc
7 changed files with 137 additions and 0 deletions

View File

@@ -335,6 +335,13 @@ type MinionList struct {
Items []Minion `json:"minions,omitempty" yaml:"minions,omitempty"`
}
// Binding is written by a scheduler to cause a pod to be bound to a host.
type Binding struct {
JSONBase `json:",inline" yaml:",inline"`
PodID string `json:"podID" yaml:"podID"`
Host string `json:"host" yaml:"host"`
}
// Status is a return value for calls that don't return other objects.
// TODO: this could go in apiserver, but I'm including it here so clients needn't
// import both.