Documentation ¶
Index ¶
- Constants
- func New(_ context.Context, _ runtime.Object, _ framework.Handle) (framework.Plugin, error)
- type RegexScheduling
- func (r *RegexScheduling) AddPod(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ *framework.PodInfo, ...) *framework.Status
- func (r *RegexScheduling) Filter(_ context.Context, state *framework.CycleState, pod *v1.Pod, ...) *framework.Status
- func (r *RegexScheduling) Name() string
- func (r *RegexScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
- func (r *RegexScheduling) PreFilterExtensions() framework.PreFilterExtensions
- func (r *RegexScheduling) RemovePod(_ context.Context, _ *framework.CycleState, _ *v1.Pod, _ *framework.PodInfo, ...) *framework.Status
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 ¶
Types ¶
type RegexScheduling ¶
type RegexScheduling struct{}
RegexScheduling is a plugin that schedules pods based on a regex annotation.
func (*RegexScheduling) AddPod ¶
func (r *RegexScheduling) AddPod( _ context.Context, _ *framework.CycleState, _ *v1.Pod, _ *framework.PodInfo, _ *framework.NodeInfo, ) *framework.Status
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 ¶
func (r *RegexScheduling) PreFilter(ctx context.Context, state *framework.CycleState, pod *v1.Pod) (*framework.PreFilterResult, *framework.Status)
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 ¶
func (r *RegexScheduling) RemovePod( _ context.Context, _ *framework.CycleState, _ *v1.Pod, _ *framework.PodInfo, _ *framework.NodeInfo, ) *framework.Status
RemovePod implements the mandatory RemovePod method of the framework.PreFilterPlugin interface. It's a no-op for this plugin.
Click to show internal directories.
Click to hide internal directories.