Documentation ¶
Index ¶
- func IsBestEffortPod(pod *v1.Pod) bool
- func IsBurstablePod(pod *v1.Pod) bool
- func IsGuaranteedPod(pod *v1.Pod) bool
- func ListPodsOnANode(ctx context.Context, client clientset.Interface, node *v1.Node, ...) ([]*v1.Pod, error)
- func ListPodsOnANodeWithFieldSelector(ctx context.Context, client clientset.Interface, node *v1.Node, ...) ([]*v1.Pod, error)
- func OwnerRef(pod *v1.Pod) []metav1.OwnerReference
- func SortPodsBasedOnPriorityLowToHigh(pods []*v1.Pod)
- func WithFilter(filter func(pod *v1.Pod) bool) func(opts *Options)
- func WithLabelSelector(labelSelector *metav1.LabelSelector) func(opts *Options)
- func WithNamespaces(namespaces []string) func(opts *Options)
- func WithoutNamespaces(namespaces []string) func(opts *Options)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBestEffortPod ¶
func IsBurstablePod ¶
func IsGuaranteedPod ¶
func ListPodsOnANode ¶
func ListPodsOnANode( ctx context.Context, client clientset.Interface, node *v1.Node, opts ...func(opts *Options), ) ([]*v1.Pod, error)
ListPodsOnANode lists all of the pods on a node It also accepts an optional "filter" function which can be used to further limit the pods that are returned. (Usually this is podEvictor.Evictable().IsEvictable, in order to only list the evictable pods on a node, but can be used by strategies to extend it if there are further restrictions, such as with NodeAffinity).
func ListPodsOnANodeWithFieldSelector ¶ added in v0.22.0
func ListPodsOnANodeWithFieldSelector( ctx context.Context, client clientset.Interface, node *v1.Node, fieldSelectorString string, opts ...func(opts *Options), ) ([]*v1.Pod, error)
ListPodsOnANodeWithFieldSelector lists all of the pods on a node using the filter selectors
func OwnerRef ¶ added in v0.4.0
func OwnerRef(pod *v1.Pod) []metav1.OwnerReference
OwnerRef returns the ownerRefList for the pod.
func SortPodsBasedOnPriorityLowToHigh ¶ added in v0.19.0
SortPodsBasedOnPriorityLowToHigh sorts pods based on their priorities from low to high. If pods have same priorities, they will be sorted by QoS in the following order: BestEffort, Burstable, Guaranteed
func WithFilter ¶ added in v0.19.0
WithFilter sets a pod filter. The filter function should return true if the pod should be returned from ListPodsOnANode
func WithLabelSelector ¶ added in v0.21.0
func WithLabelSelector(labelSelector *metav1.LabelSelector) func(opts *Options)
WithLabelSelector sets a pod label selector
func WithNamespaces ¶ added in v0.19.0
WithNamespaces sets included namespaces
func WithoutNamespaces ¶ added in v0.19.0
WithoutNamespaces sets excluded namespaces