scheduler_plugin

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName of the plugin used in the plugin registry and configurations.
	PluginName = "kube-throttler"
)

Variables

View Source
var (
	DefaultReconcileTemporaryThresholdInterval = 15 * time.Second
)

Functions

func NewPlugin

func NewPlugin(configuration runtime.Object, fh framework.Handle) (framework.Plugin, error)

NewPlugin initializes a new plugin and returns it.

Types

type KubeThrottler

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

func (*KubeThrottler) EventsToRegister added in v1.3.1

func (p *KubeThrottler) EventsToRegister() []framework.ClusterEvent

func (*KubeThrottler) Name

func (p *KubeThrottler) Name() string

func (*KubeThrottler) PreFilter

func (pl *KubeThrottler) PreFilter(
	ctx context.Context,
	state *framework.CycleState,
	pod *v1.Pod,
) (*framework.PreFilterResult, *framework.Status)

func (*KubeThrottler) PreFilterExtensions

func (p *KubeThrottler) PreFilterExtensions() framework.PreFilterExtensions

func (*KubeThrottler) Reserve

func (pl *KubeThrottler) Reserve(
	ctx context.Context,
	state *framework.CycleState,
	pod *v1.Pod,
	node string,
) *framework.Status

func (*KubeThrottler) Unreserve

func (pl *KubeThrottler) Unreserve(
	ctx context.Context,
	state *framework.CycleState,
	pod *v1.Pod,
	node string,
)

type KubeThrottlerPluginArgs

type KubeThrottlerPluginArgs struct {
	Name                                string        `json:"name"`
	KubeConifg                          string        `json:"kubeconfig"`
	ReconcileTemporaryThresholdInterval time.Duration `json:"reconcileTemporaryThresholdInterval"`
	TargetSchedulerName                 string        `json:"targetSchedulerName"`
	ControllerThrediness                int           `json:"controllerThrediness"`
	NumKeyMutex                         int           `json:"numKeyMutex"`
}

func DecodePluginArgs

func DecodePluginArgs(configuration runtime.Object) (*KubeThrottlerPluginArgs, error)

Jump to

Keyboard shortcuts

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