Documentation ¶
Index ¶
- Constants
- Variables
- func CreateMergePatch(original, new interface{}) ([]byte, error)
- func GetPodGroupFullName(pod *v1.Pod) string
- func GetPodGroupLabel(pod *v1.Pod) string
- func GetWaitTimeDuration(pg *v1alpha1.PodGroup, scheduleTimeout *time.Duration) time.Duration
- func Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc)
Constants ¶
View Source
const DefaultWaitTime = 60 * time.Second
DefaultWaitTime is 60s if ScheduleTimeoutSeconds is not specified.
View Source
const (
// PodGroupLabel is the default label of coscheduling
PodGroupLabel = "pod-group.scheduling.sigs.k8s.io"
)
Variables ¶
View Source
var ( // ErrorNotMatched means pod does not match coscheduling ErrorNotMatched = fmt.Errorf("not match coscheduling") // 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 ¶
CreateMergePatch return patch generated from original and new interfaces
func GetPodGroupFullName ¶
GetPodGroupFullName get namespaced group name from pod annotations
func GetPodGroupLabel ¶
GetPodGroupLabel get pod group from pod annotations
func GetWaitTimeDuration ¶
GetWaitTimeDuration returns a wait timeout based on the following precedences: 1. spec.scheduleTimeoutSeconds of the given pg, if specified 2. given scheduleTimeout, if not nil 3. fall back to DefaultWaitTime
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.