package listers
import "k8s.io/kubernetes/pkg/scheduler/listers"
Index ¶
- func GetPodServices(serviceLister v1listers.ServiceLister, pod *v1.Pod) ([]*v1.Service, error)
- type NodeInfoLister
- type PodFilter
- type PodLister
- type SharedLister
Functions ¶
func GetPodServices ¶
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.
Types ¶
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 list of NodeInfos of nodes with pods with required anti-affinity terms. HavePodsWithRequiredAntiAffinityList() ([]*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 ¶
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 { PodLister () NodeInfoLister }()
SharedLister groups scheduler-specific listers.
Source Files ¶
listers.go
Directories ¶
Path | Synopsis |
---|---|
pkg/scheduler/listers/fake |
- Version
- v1.18.14
- Published
- Dec 18, 2020
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 minutes ago –
Tools for package owners.