kubernetes: k8s.io/kubernetes/pkg/scheduler/listers Index | Files | Directories

package listers

import "k8s.io/kubernetes/pkg/scheduler/listers"


Package Files


func GetPodServices Uses

func GetPodServices(serviceLister v1listers.ServiceLister, pod *v1.Pod) ([]*v1.Service, error)

GetPodServices gets the services that have the selector that match the labels on the given pod. TODO: this should be moved to ServiceAffinity plugin once that plugin is ready.

type NodeInfoLister Uses

type NodeInfoLister interface {
    // Returns the list of NodeInfos.
    List() ([]*schedulernodeinfo.NodeInfo, error)
    // Returns the list of NodeInfos of nodes with pods with affinity terms.
    HavePodsWithAffinityList() ([]*schedulernodeinfo.NodeInfo, error)
    // Returns the NodeInfo of the given node name.
    Get(nodeName string) (*schedulernodeinfo.NodeInfo, error)

NodeInfoLister interface represents anything that can list/get NodeInfo objects from node name.

type PodFilter Uses

type PodFilter func(*v1.Pod) bool

PodFilter is a function to filter a pod. If pod passed return true else return false.

type PodLister Uses

type PodLister interface {
    // Returns the list of pods.
    List(labels.Selector) ([]*v1.Pod, error)
    // This is similar to "List()", but the returned slice does not
    // contain pods that don't pass `podFilter`.
    FilteredList(podFilter PodFilter, selector labels.Selector) ([]*v1.Pod, error)

PodLister interface represents anything that can list pods for a scheduler.

type SharedLister Uses

type SharedLister interface {
    Pods() PodLister
    NodeInfos() NodeInfoLister

SharedLister groups scheduler-specific listers.



Package listers imports 4 packages (graph) and is imported by 46 packages. Updated 2020-03-03. Refresh now. Tools for package owners.