kubernetes: k8s.io/kubernetes/pkg/scheduler/framework/plugins/migration Index | Files

package migration

import "k8s.io/kubernetes/pkg/scheduler/framework/plugins/migration"

Index

Package Files

utils.go

Constants

const (
    // PredicatesStateKey is the key in CycleState to PredicateStateData
    PredicatesStateKey = "predicates"

    // PrioritiesStateKey is the key in CycleState to PrioritiesStateData
    PrioritiesStateKey = "priorities"
)

func ErrorToFrameworkStatus Uses

func ErrorToFrameworkStatus(err error) *framework.Status

ErrorToFrameworkStatus converts an error to a framework status.

func PredicateMetadata Uses

func PredicateMetadata(state *framework.CycleState) interface{}

PredicateMetadata returns predicate metadata stored in CycleState.

func PredicateResultToFrameworkStatus Uses

func PredicateResultToFrameworkStatus(reasons []predicates.PredicateFailureReason, err error) *framework.Status

PredicateResultToFrameworkStatus converts a predicate result (PredicateFailureReason + error) to a framework status.

func PriorityMetadata Uses

func PriorityMetadata(state *framework.CycleState) interface{}

PriorityMetadata returns priority metadata stored in CycleState.

type PredicatesStateData Uses

type PredicatesStateData struct {
    Reference interface{}
}

PredicatesStateData is a pointer to Metadata. In the normal case, StateData is supposed to be generated and stored in CycleState by a framework plugin (like a PreFilter pre-computing data for its corresponding Filter). However, during migration, the scheduler will inject a pointer to Metadata into CycleState. This "hack" is necessary because during migration Filters that implement predicates functionality will be calling into the existing predicate functions, and need to pass Metadata.

func (*PredicatesStateData) Clone Uses

func (p *PredicatesStateData) Clone() framework.StateData

Clone is supposed to make a copy of the data, but since this is just a pointer, we are practically just copying the pointer. This is ok because the actual reference to the Metadata copy that is made by generic_scheduler during preemption cycle will be injected again outside the framework.

type PrioritiesStateData Uses

type PrioritiesStateData struct {
    Reference interface{}
}

PrioritiesStateData is a pointer to PrioritiesMetadata.

func (*PrioritiesStateData) Clone Uses

func (p *PrioritiesStateData) Clone() framework.StateData

Clone is supposed to make a copy of the data, but since this is just a pointer, we are practically just copying the pointer.

Package migration imports 3 packages (graph) and is imported by 24 packages. Updated 2019-11-21. Refresh now. Tools for package owners.