util

package
v0.0.0-...-fe9cd46 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PodGroupAnn is not used now
	PodGroupAnn = "group.batch.scheduler.tencent.com"
	// PodGroupLabel is the default label of batch scheduler
	PodGroupLabel = "group.batch.scheduler.tencent.com"
)
View Source
const DefaultWaitTime = 60 * time.Second

DefaultWaitTime is 60s if MaxScheduleTime is not specified.

Variables

View Source
var (
	// ErrorNotMatched means pod does not match batch scheduling
	ErrorNotMatched = fmt.Errorf("not match batch scheduling")
	// ErrorWaiting means pod number does not match the min pods required
	ErrorWaiting = fmt.Errorf("waiting")
	// ErrorResourceNotEnough means cluster resource is not enough, mainly used in Pre-Filter
	ErrorResourceNotEnough = fmt.Errorf("resource not enough")
)

Functions

func CreateMergePatch

func CreateMergePatch(original, new interface{}) ([]byte, error)

CreateMergePatch return patch generated from original and new interfaces

func GetPodGroupFullName

func GetPodGroupFullName(pg *v12.PodGroup) string

GetPodGroupFullName verify if pod ann satisfies batch scheduling

func GetWaitTimeDuration

func GetWaitTimeDuration(pg *v12.PodGroup, defaultMaxScheTime *time.Duration) time.Duration

GetWaitTimeDuration verify if pod ann satisfies batch scheduling

func VerifyPodAnnSatisfied

func VerifyPodAnnSatisfied(pod *v1.Pod) (string, bool)

VerifyPodAnnSatisfied verifies if pod ann satisfies batch scheduling

func VerifyPodLabelSatisfied

func VerifyPodLabelSatisfied(pod *v1.Pod) (string, bool)

VerifyPodLabelSatisfied verifies if pod ann satisfies batch scheduling

Types

This section is empty.

Jump to

Keyboard shortcuts

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