Documentation ¶
Index ¶
- func GenerateNodeMapAndSlice(nodes map[string]*api.NodeInfo) (map[string]*cache.NodeInfo, []*v1.Node)
- func HaveAffinity(pod *v1.Pod) bool
- type CachedNodeInfo
- type NodeLister
- type PodAffinityLister
- type PodLister
- func (pl *PodLister) AffinityFilteredList(podFilter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
- func (pl *PodLister) AffinityLister() *PodAffinityLister
- func (pl *PodLister) FilteredList(podFilter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
- func (pl *PodLister) GetPod(task *api.TaskInfo) *v1.Pod
- func (pl *PodLister) List(selector labels.Selector) ([]*v1.Pod, error)
- func (pl *PodLister) UpdateTask(task *api.TaskInfo, nodeName string) *v1.Pod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNodeMapAndSlice ¶
func GenerateNodeMapAndSlice(nodes map[string]*api.NodeInfo) (map[string]*cache.NodeInfo, []*v1.Node)
GenerateNodeMapAndSlice returns the nodeMap and nodeSlice generated from ssn
func HaveAffinity ¶
HaveAffinity checks pod have affinity or not
Types ¶
type CachedNodeInfo ¶
CachedNodeInfo is used in nodeorder and predicate plugin
func (*CachedNodeInfo) GetNodeInfo ¶
func (c *CachedNodeInfo) GetNodeInfo(name string) (*v1.Node, error)
GetNodeInfo is used to get info of a particular node
type NodeLister ¶
NodeLister is used in nodeorder plugin
type PodAffinityLister ¶
type PodAffinityLister struct {
// contains filtered or unexported fields
}
PodAffinityLister is used to list pod with affinity
func (*PodAffinityLister) FilteredList ¶
func (pal *PodAffinityLister) FilteredList(podFilter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
FilteredList is used to list all the pods with affinity under filter condition
type PodLister ¶
type PodLister struct { Session *framework.Session CachedPods map[api.TaskID]*v1.Pod Tasks map[api.TaskID]*api.TaskInfo TaskWithAffinity map[api.TaskID]*api.TaskInfo }
PodLister is used in predicate and nodeorder plugin
func NewPodLister ¶
NewPodLister returns a PodLister generate from ssn
func (*PodLister) AffinityFilteredList ¶
func (pl *PodLister) AffinityFilteredList(podFilter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
AffinityFilteredList is used to list all the pods with affinity under filter condition
func (*PodLister) AffinityLister ¶
func (pl *PodLister) AffinityLister() *PodAffinityLister
AffinityLister generate a PodAffinityLister following current PodLister
func (*PodLister) FilteredList ¶
func (pl *PodLister) FilteredList(podFilter algorithm.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
FilteredList is used to list all the pods under filter condition
func (*PodLister) GetPod ¶
GetPod will get pod with proper nodeName, from cache or DeepCopy keeping this function read only to avoid concurrent panic of map