k8s_utils

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetK8sFeatures

func GetK8sFeatures() k8splfeature.Features

func NewFrameworkHandle

func NewFrameworkHandle(
	client kubernetes.Interface,
	informerFactory informers.SharedInformerFactory,
	nodeInfoLister k8sframework.NodeInfoLister,
) k8sframework.Handle

NewFrameworkHandle creates a FrameworkHandle interface, which is used by k8s plugins.

Types

type K8sFramework

type K8sFramework struct {
	// contains filtered or unexported fields
}

This is a stand-in for K8sFramework Handle that kubernetes uses for its plugins. Only the methods needed for the predicate plugins are implemented.

func (*K8sFramework) Activate

func (f *K8sFramework) Activate(logger klog.Logger, pods map[string]*v1.Pod)

func (*K8sFramework) AddNominatedPod

func (f *K8sFramework) AddNominatedPod(logger klog.Logger, pod *k8sframework.PodInfo, nominatingInfo *k8sframework.NominatingInfo)

func (*K8sFramework) ClientSet

func (f *K8sFramework) ClientSet() kubernetes.Interface

ClientSet returns a kubernetes clientset.

func (*K8sFramework) DeleteNominatedPodIfExists

func (f *K8sFramework) DeleteNominatedPodIfExists(pod *v1.Pod)

func (*K8sFramework) EventRecorder

func (f *K8sFramework) EventRecorder() events.EventRecorder

EventRecorder was introduced in k8s v1.19.6 and to be implemented

func (*K8sFramework) Extenders

func (f *K8sFramework) Extenders() []k8sframework.Extender

func (*K8sFramework) GetWaitingPod

func (f *K8sFramework) GetWaitingPod(uid types.UID) k8sframework.WaitingPod

GetWaitingPod returns a reference to a WaitingPod given its UID.

func (*K8sFramework) HasFilterPlugins

func (f *K8sFramework) HasFilterPlugins() bool

HasFilterPlugins returns true if at least one filter plugin is defined.

func (*K8sFramework) HasScorePlugins

func (f *K8sFramework) HasScorePlugins() bool

HasScorePlugins returns true if at least one score plugin is defined.

func (*K8sFramework) IterateOverWaitingPods

func (f *K8sFramework) IterateOverWaitingPods(callback func(k8sframework.WaitingPod))

IterateOverWaitingPods acquires a read lock and iterates over the WaitingPods map.

func (*K8sFramework) KubeConfig

func (f *K8sFramework) KubeConfig() *rest.Config

func (*K8sFramework) ListPlugins

func (f *K8sFramework) ListPlugins() map[string][]config.Plugin

ListPlugins returns a map of extension point name to plugin names configured at each extension point. Returns nil if no plugins were configured.

func (*K8sFramework) NominatedPodsForNode

func (f *K8sFramework) NominatedPodsForNode(nodeName string) []*k8sframework.PodInfo

func (*K8sFramework) Parallelizer

func (f *K8sFramework) Parallelizer() parallelize.Parallelizer

func (*K8sFramework) RejectWaitingPod

func (f *K8sFramework) RejectWaitingPod(uid types.UID) bool

func (*K8sFramework) RunFilterPlugins

func (f *K8sFramework) RunFilterPlugins(ctx context.Context, state *k8sframework.CycleState, pod *v1.Pod, info *k8sframework.NodeInfo) *k8sframework.Status

func (*K8sFramework) RunFilterPluginsWithNominatedPods

func (f *K8sFramework) RunFilterPluginsWithNominatedPods(ctx context.Context, state *k8sframework.CycleState, pod *v1.Pod, info *k8sframework.NodeInfo) *k8sframework.Status

func (*K8sFramework) RunPreFilterExtensionAddPod

func (f *K8sFramework) RunPreFilterExtensionAddPod(ctx context.Context, state *k8sframework.CycleState, podToSchedule *v1.Pod, podInfoToAdd *k8sframework.PodInfo, nodeInfo *k8sframework.NodeInfo) *k8sframework.Status

func (*K8sFramework) RunPreFilterExtensionRemovePod

func (f *K8sFramework) RunPreFilterExtensionRemovePod(ctx context.Context, state *k8sframework.CycleState, podToSchedule *v1.Pod, podInfoToRemove *k8sframework.PodInfo, nodeInfo *k8sframework.NodeInfo) *k8sframework.Status

func (*K8sFramework) RunPreScorePlugins

func (f *K8sFramework) RunPreScorePlugins(ctx context.Context, state *k8sframework.CycleState, pod *v1.Pod, infos []*k8sframework.NodeInfo) *k8sframework.Status

func (*K8sFramework) RunScorePlugins

func (*K8sFramework) SharedDRAManager

func (f *K8sFramework) SharedDRAManager() k8sframework.SharedDRAManager

func (*K8sFramework) SharedInformerFactory

func (f *K8sFramework) SharedInformerFactory() informers.SharedInformerFactory

SharedInformerFactory returns a shared informer factory.

func (*K8sFramework) SnapshotSharedLister

func (f *K8sFramework) SnapshotSharedLister() k8sframework.SharedLister

func (*K8sFramework) UpdateNominatedPod

func (f *K8sFramework) UpdateNominatedPod(logger klog.Logger, oldPod *v1.Pod, newPodInfo *k8sframework.PodInfo)

func (*K8sFramework) VolumeBinder

func (f *K8sFramework) VolumeBinder() scheduling.SchedulerVolumeBinder

VolumeBinder returns the volume binder used by scheduler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL