schedulepolicy

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NOT_RECOGNIZED_RUNTIME_TYPE = errors.Errorf("task kind is runtime but spec not fit")
	NOT_RECOGNIZED_JOB_TYPE     = errors.Errorf("task kind is job but spec not fit")
)

Functions

func LabelFilterChain

func LabelFilterChain(configs *executorconfig.ExecutorWholeConfigs, name, kind string, obj interface{}) (apistructs.ScheduleInfo2, apistructs.ScheduleInfo, interface{}, error)

+-------------------------------------------------------------------------------------------+ | | | ServiceGroup / Job | | | +------------------------------------------------------^^-----------------------------------+

||                   ||
||                   ||

+---------------------------------vv--------------------------------------------------------+ | label scheduling | | | | +-------------------+ +------------+ +---------------+ +---------------+ | | |2 | |1 | |7 | | | | | | org label filter <--+ prestart | | DC/OS CLUSTER | | Others | | | | <--+ filter | | | | | | | +-------------------+ +------------+ +---------^-----+ +---------^-----+ | | || | | | | || | | | | +--------vv---------+ +------------+ +---+--------------------+------+ | | |3 | |5 | |6 | | | | workspace label | | poststop +------------> LabelConstrainsExitLayer | | | | filter | | filter +------------> | | | | | +----^^------+ | | | | +-------------------+ || +-------------------------------+ | | || || | | || || | | || || | | +--------vv-----------------------------------------------------------------------+ | | |4 identity label filter | | | | +---------------+ +--------------+ +-------------+ +--------------+ | | | | | job label | | pack label | | stateful | | stateless | | | | | | +----> +----> label +----> label | | | | | +---------------+ +--------------+ +-------------+ +------+-------+ | | | | | | | | | +-------------+ +------v-------+ | | | | | ... ... | | bigdata | | | | | | +<---+ label | | | | | +-------------+ +--------------+ | | | +---------------------------------------------------------------------------------+ | | | +-------------------------------------------------------------------------------------------+

Convert label preferences into scheduling constraints that can be recognized by different clusters The information that needs to be obtained includes: 1, Cluster configuration information, including basic configuration and fine configuration 2, runtime or job specific label The first parameter returned is the specific constraint, and the second parameter is the configuration obtained by the application in the cluster fine configuration (if any)

Types

type Pass1ScheduleInfo

type Pass1ScheduleInfo labelconfig.LabelInfo

request -----> Pass1ScheduleInfo(aka LabelInfo) -----> Pass2ScheduleInfo(apistructs.ScheduleInfo)

func NewPass1ScheduleInfo

func NewPass1ScheduleInfo(executorName string, executorKind string, labels map[string]string,
	configs *executorconfig.ExecutorWholeConfigs, objName string,
	selectors map[string]diceyml.Selectors) Pass1ScheduleInfo

type Pass2ScheduleInfo

type Pass2ScheduleInfo apistructs.ScheduleInfo

Pass2ScheduleInfo request -> Pass1ScheduleInfo(LabelInfo) ------------> Pass2ScheduleInfo(apistructs.ScheduleInfo)

filters

type Pass2ScheduleInfo2

type Pass2ScheduleInfo2 apistructs.ScheduleInfo2

Directories

Path Synopsis
Package constraintbuilders Generate various executor specific constraints (constraints) according to scheduleInfo
Package constraintbuilders Generate various executor specific constraints (constraints) according to scheduleInfo
k8s
Package labelconfig label 调度相关 key 名, 以及中间结构定义
Package labelconfig label 调度相关 key 名, 以及中间结构定义

Jump to

Keyboard shortcuts

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