plugin

package
v0.0.0-...-7386f4e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the plugin used in the plugin registry and configurations.
	Name = "RegexScheduling"
)

Variables

This section is empty.

Functions

func New

New initializes a new RegexScheduling plugin and returns it.

Types

type RegexScheduling

type RegexScheduling struct{}

RegexScheduling is a plugin that schedules pods based on a regex annotation.

func (*RegexScheduling) AddPod

AddPod implements the mandatory AddPod method of the framework.PreFilterPlugin interface. It's a no-op for this plugin.

func (*RegexScheduling) Filter

func (r *RegexScheduling) Filter(_ context.Context, state *framework.CycleState, pod *v1.Pod, nodeInfo *framework.NodeInfo) *framework.Status

Filter filters out nodes that do not match the regex in the state, if it is defined, otherwise it returns success.

func (*RegexScheduling) Name

func (r *RegexScheduling) Name() string

Name returns name of the plugin. It is used in logs, etc.

func (*RegexScheduling) PreFilter

PreFilter looks for a regex annotation in the pod and stores the compiled version in the state.

func (*RegexScheduling) PreFilterExtensions

func (r *RegexScheduling) PreFilterExtensions() framework.PreFilterExtensions

PreFilterExtensions implements the mandatory PreFilterExtensions interface.

func (*RegexScheduling) RemovePod

RemovePod implements the mandatory RemovePod method of the framework.PreFilterPlugin interface. It's a no-op for this plugin.

Jump to

Keyboard shortcuts

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