Back to

package listers

Latest Go to latest
Published: May 20, 2020 | License: Apache-2.0 | Module:


func GetPodServices

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

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

type PodFilter func(*v1.Pod) bool

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

type PodLister

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

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

SharedLister groups scheduler-specific listers.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier