rules

package
v0.0.0-...-930f148 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule interface {
	// The name of the rule.
	Name() string
	// Drainable determines whether a given pod is drainable according to
	// the specific Rule.
	//
	// DrainContext cannot be nil.
	Drainable(*drainability.DrainContext, *apiv1.Pod, *framework.NodeInfo) drainability.Status
}

Rule determines whether a given pod can be drained or not.

type Rules

type Rules []Rule

Rules defines operations on a collections of rules.

func Default

func Default(deleteOptions options.NodeDeleteOptions) Rules

Default returns the default list of Rules.

func (Rules) Drainable

func (rs Rules) Drainable(drainCtx *drainability.DrainContext, pod *apiv1.Pod, nodeInfo *framework.NodeInfo) drainability.Status

Drainable determines whether a given pod is drainable according to the specified set of rules.

Jump to

Keyboard shortcuts

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