Documentation ¶
Index ¶
- Constants
- Variables
- func CapacityPredicate(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (bool, error)
- func LuckyPredicate(pod *corev1.Pod, node *corev1.Node) (bool, []string, error)
- func Predicates(Ctx *algorithm.SchedulingContext, PredicateFuncs []PredicateFunc, ...) (fits bool, failedReasons []string, err error)
- func SnapshotPredicate(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (bool, error)
- type Predicate
- type PredicateFunc
Constants ¶
View Source
const (
// LuckyPred rejects a node if you're not lucky ¯\_(ツ)_/¯
LuckyPredFailMsg = "Well, you're not lucky"
)
Variables ¶
View Source
var ( // Newly added predicates should be placed here DefaultPredicateFuncs = []PredicateFunc{ CapacityPredicate, } )
Functions ¶
func CapacityPredicate ¶
func CapacityPredicate(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (bool, error)
CapacityPredicate checks if local storage on a node matches the persistent volume claims, follow rules are applied:
- pvc contains vg or mount point or device claim
- node free size must larger or equal to pvcs
- for pvc of type mount point/device: a. must contains more mount points than pvc count
func LuckyPredicate ¶
func Predicates ¶
func Predicates(Ctx *algorithm.SchedulingContext, PredicateFuncs []PredicateFunc, pod *corev1.Pod, node *corev1.Node) (fits bool, failedReasons []string, err error)
func SnapshotPredicate ¶
func SnapshotPredicate(ctx *algorithm.SchedulingContext, pod *corev1.Pod, node *corev1.Node) (bool, error)
SnapshotPredicate checks if node of the source pv is source node
Types ¶
type Predicate ¶
type Predicate struct { Name string Ctx *algorithm.SchedulingContext PredicateFuncs []PredicateFunc }
func NewPredicate ¶
func NewPredicate(ctx *algorithm.SchedulingContext) *Predicate
func (Predicate) Handler ¶
func (p Predicate) Handler(args schedulerapi.ExtenderArgs) (*schedulerapi.ExtenderFilterResult, error)
type PredicateFunc ¶
Click to show internal directories.
Click to hide internal directories.