Documentation ¶
Index ¶
- func DecodeInto(obj runtime.Object, into interface{}) error
- func NewFramework(ctx context.Context, r Registry, profile *config.KubeSchedulerProfile, ...) (framework.Framework, error)
- func NewWaitingPodsMap() *waitingPodsMap
- type CaptureProfile
- type Option
- func WithCaptureProfile(c CaptureProfile) Option
- func WithClientSet(clientSet clientset.Interface) Option
- func WithComponentConfigVersion(componentConfigVersion string) Option
- func WithEventRecorder(recorder events.EventRecorder) Option
- func WithExtenders(extenders []framework.Extender) Option
- func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option
- func WithKubeConfig(kubeConfig *restclient.Config) Option
- func WithLogger(logger klog.Logger) Option
- func WithMetricsRecorder(r *metrics.MetricAsyncRecorder) Option
- func WithParallelism(parallelism int) Option
- func WithPodNominator(nominator framework.PodNominator) Option
- func WithResourceClaimCache(resourceClaimCache *assumecache.AssumeCache) Option
- func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Option
- func WithWaitingPods(wp *waitingPodsMap) Option
- type PluginFactory
- type PluginFactoryWithFts
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeInto ¶
DecodeInto decodes configuration whose type is *runtime.Unknown to the interface into.
func NewFramework ¶
func NewFramework(ctx context.Context, r Registry, profile *config.KubeSchedulerProfile, opts ...Option) (framework.Framework, error)
NewFramework initializes plugins given the configuration and the registry.
func NewWaitingPodsMap ¶ added in v1.31.0
func NewWaitingPodsMap() *waitingPodsMap
NewWaitingPodsMap returns a new waitingPodsMap.
Types ¶
type CaptureProfile ¶ added in v1.20.0
type CaptureProfile func(config.KubeSchedulerProfile)
CaptureProfile is a callback to capture a finalized profile.
type Option ¶
type Option func(*frameworkOptions)
Option for the frameworkImpl.
func WithCaptureProfile ¶ added in v1.20.0
func WithCaptureProfile(c CaptureProfile) Option
WithCaptureProfile sets a callback to capture the finalized profile.
func WithClientSet ¶
WithClientSet sets clientSet for the scheduling frameworkImpl.
func WithComponentConfigVersion ¶ added in v1.22.0
WithComponentConfigVersion sets the component config version to the KubeSchedulerConfiguration version used. The string should be the full scheme group/version of the external type we converted from (for example "kubescheduler.config.k8s.io/v1")
func WithEventRecorder ¶
func WithEventRecorder(recorder events.EventRecorder) Option
WithEventRecorder sets clientSet for the scheduling frameworkImpl.
func WithExtenders ¶
WithExtenders sets extenders for the scheduling frameworkImpl.
func WithInformerFactory ¶
func WithInformerFactory(informerFactory informers.SharedInformerFactory) Option
WithInformerFactory sets informer factory for the scheduling frameworkImpl.
func WithKubeConfig ¶ added in v1.22.0
func WithKubeConfig(kubeConfig *restclient.Config) Option
WithKubeConfig sets kubeConfig for the scheduling frameworkImpl.
func WithLogger ¶ added in v1.28.0
func WithLogger(logger klog.Logger) Option
WithLogger overrides the default logger from k8s.io/klog.
func WithMetricsRecorder ¶ added in v1.27.0
func WithMetricsRecorder(r *metrics.MetricAsyncRecorder) Option
WithMetricsRecorder sets metrics recorder for the scheduling frameworkImpl.
func WithParallelism ¶ added in v1.21.0
WithParallelism sets parallelism for the scheduling frameworkImpl.
func WithPodNominator ¶
func WithPodNominator(nominator framework.PodNominator) Option
WithPodNominator sets podNominator for the scheduling frameworkImpl.
func WithResourceClaimCache ¶ added in v1.31.0
func WithResourceClaimCache(resourceClaimCache *assumecache.AssumeCache) Option
WithResourceClaimCache sets the resource claim cache for the scheduling frameworkImpl.
func WithSnapshotSharedLister ¶
func WithSnapshotSharedLister(snapshotSharedLister framework.SharedLister) Option
WithSnapshotSharedLister sets the SharedLister of the snapshot.
func WithWaitingPods ¶ added in v1.31.0
func WithWaitingPods(wp *waitingPodsMap) Option
WithWaitingPods sets waitingPods for the scheduling frameworkImpl.
type PluginFactory ¶
type PluginFactory = func(ctx context.Context, configuration runtime.Object, f framework.Handle) (framework.Plugin, error)
PluginFactory is a function that builds a plugin.
func FactoryAdapter ¶ added in v1.23.0
func FactoryAdapter(fts plfeature.Features, withFts PluginFactoryWithFts) PluginFactory
FactoryAdapter can be used to inject feature gates for a plugin that needs them when the caller expects the older PluginFactory method.
type PluginFactoryWithFts ¶ added in v1.23.0
type PluginFactoryWithFts func(context.Context, runtime.Object, framework.Handle, plfeature.Features) (framework.Plugin, error)
PluginFactoryWithFts is a function that builds a plugin with certain feature gates.
type Registry ¶
type Registry map[string]PluginFactory
Registry is a collection of all available plugins. The framework uses a registry to enable and initialize configured plugins. All plugins must be in the registry before initializing the framework.
func (Registry) Register ¶
func (r Registry) Register(name string, factory PluginFactory) error
Register adds a new plugin to the registry. If a plugin with the same name exists, it returns an error.
func (Registry) Unregister ¶
Unregister removes an existing plugin from the registry. If no plugin with the provided name exists, it returns an error.