Documentation
¶
Overview ¶
Package extender contains types and logic to respond to requests from a Kubernetes http scheduler extender.
Index ¶
- func GetKubeClient(kubeConfig string) (kubernetes.Interface, *rest.Config, error)
- func GetKubeClientExt(kubeConfig string, burst int, qps float32) (kubernetes.Interface, *rest.Config, error)
- type Args
- type BindingArgs
- type BindingResult
- type FailedNodesMap
- type FilterResult
- type HostPriority
- type HostPriorityList
- type Scheduler
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeClient ¶
GetKubeClient returns the kube client interface with its config.
func GetKubeClientExt ¶ added in v0.5.0
func GetKubeClientExt(kubeConfig string, burst int, qps float32) (kubernetes.Interface, *rest.Config, error)
GetKubeClientExt returns the kube client interface with its config. The given Burst and QPS are set into the config.
Types ¶
type Args ¶
type Args struct {
// List of candidate nodes where the pod can be scheduled; to be populated
// only if ExtenderConfig.NodeCacheCapable == false
Nodes *v1.NodeList
// List of candidate node names where the pod can be scheduled; to be
// populated only if ExtenderConfig.NodeCacheCapable == true
NodeNames *[]string
// Pod being scheduled
Pod v1.Pod
}
Args represents the arguments needed by the extender to Filter/Prioritize nodes for a pod.
type BindingArgs ¶
type BindingArgs 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
}
BindingArgs represents the arguments to an extender for binding a pod to a node.
type BindingResult ¶
type BindingResult struct {
// Error message indicating failure
Error string
}
BindingResult stores the result from extender to be sent as response.
type FailedNodesMap ¶
FailedNodesMap is needed by HTTP server response.
type FilterResult ¶
type FilterResult struct {
// Filtered set of nodes where the pod can be scheduled; to be populated
// only if ExtenderConfig.NodeCacheCapable == false
Nodes *v1.NodeList
// Filtered set of nodes where the pod can be scheduled; to be populated
// only if ExtenderConfig.NodeCacheCapable == true
NodeNames *[]string
// Filtered out nodes where the pod can't be scheduled and the failure messages
FailedNodes FailedNodesMap
// Error message indicating failure
Error string
}
FilterResult stores the result from extender to be sent as response.
type HostPriority ¶
type HostPriority struct {
// Name of the host
Host string
// Score associated with the host
Score int
}
HostPriority represents the priority of scheduling to a particular host, higher priority is better.
type HostPriorityList ¶
type HostPriorityList []HostPriority
HostPriorityList declares a []HostPriority type.
type Scheduler ¶
type Scheduler interface {
Bind(w http.ResponseWriter, r *http.Request)
Prioritize(w http.ResponseWriter, r *http.Request)
Filter(w http.ResponseWriter, r *http.Request)
}
Scheduler has the capabilities needed to prioritize and filter nodes based on http requests.