const DefaultExtenderTimeout … type HTTPExtender … func makeTransport(config *schedulerapi.Extender) (http.RoundTripper, error) { … } // NewHTTPExtender creates an HTTPExtender object. func NewHTTPExtender(config *schedulerapi.Extender) (framework.Extender, error) { … } // Name returns extenderURL to identify the extender. func (h *HTTPExtender) Name() string { … } // IsIgnorable returns true indicates scheduling should not fail when this extender // is unavailable func (h *HTTPExtender) IsIgnorable() bool { … } // SupportsPreemption returns true if an extender supports preemption. // An extender should have preempt verb defined and enabled its own node cache. func (h *HTTPExtender) SupportsPreemption() bool { … } // ProcessPreemption returns filtered candidate nodes and victims after running preemption logic in extender. func (h *HTTPExtender) ProcessPreemption( pod *v1.Pod, nodeNameToVictims map[string]*extenderv1.Victims, nodeInfos framework.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { … } // convertToVictims converts "nodeNameToMetaVictims" from object identifiers, // such as UIDs and names, to object pointers. func (h *HTTPExtender) convertToVictims( nodeNameToMetaVictims map[string]*extenderv1.MetaVictims, nodeInfos framework.NodeInfoLister, ) (map[string]*extenderv1.Victims, error) { … } // convertPodUIDToPod returns v1.Pod object for given MetaPod and node info. // The v1.Pod object is restored by nodeInfo.Pods(). // It returns an error if there's cache inconsistency between default scheduler // and extender, i.e. when the pod is not found in nodeInfo.Pods. func (h *HTTPExtender) convertPodUIDToPod( metaPod *extenderv1.MetaPod, nodeInfo *framework.NodeInfo) (*v1.Pod, error) { … } // convertToMetaVictims converts from struct type to meta types. func convertToMetaVictims( nodeNameToVictims map[string]*extenderv1.Victims, ) map[string]*extenderv1.MetaVictims { … } // Filter based on extender implemented predicate functions. The filtered list is // expected to be a subset of the supplied list; otherwise the function returns an error. // The failedNodes and failedAndUnresolvableNodes optionally contains the list // of failed nodes and failure reasons, except nodes in the latter are // unresolvable. func (h *HTTPExtender) Filter( pod *v1.Pod, nodes []*framework.NodeInfo, ) (filteredList []*framework.NodeInfo, failedNodes, failedAndUnresolvableNodes extenderv1.FailedNodesMap, err error) { … } // Prioritize based on extender implemented priority functions. Weight*priority is added // up for each such priority function. The returned score is added to the score computed // by Kubernetes scheduler. The total score is used to do the host selection. func (h *HTTPExtender) Prioritize(pod *v1.Pod, nodes []*framework.NodeInfo) (*extenderv1.HostPriorityList, int64, error) { … } // Bind delegates the action of binding a pod to a node to the extender. func (h *HTTPExtender) Bind(binding *v1.Binding) error { … } // IsBinder returns whether this extender is configured for the Bind method. func (h *HTTPExtender) IsBinder() bool { … } // IsPrioritizer returns whether this extender is configured for the Prioritize method. func (h *HTTPExtender) IsPrioritizer() bool { … } // IsFilter returns whether this extender is configured for the Filter method. func (h *HTTPExtender) IsFilter() bool { … } // Helper function to send messages to the extender func (h *HTTPExtender) send(action string, args interface{ … } // IsInterested returns true if at least one extended resource requested by // this pod is managed by this extender. func (h *HTTPExtender) IsInterested(pod *v1.Pod) bool { … } func (h *HTTPExtender) hasManagedResources(containers []v1.Container) bool { … }