mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user