controller

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodGroupWorkers = 4

	AddPodGroupEventFmt    = "AddPodGroupEvent"
	UpdatePodGroupEventFmt = "UpdatePodGroupEvent"
	DeletePodGroupEventFmt = "DeletePodGroupEvent"

	AddPodEventFmt    = "AddPodEvent(%v)"
	UpdatePodEventFmt = "UpdatePodEvent(%v)"
	DeletePodEventFmt = "DeletePodEvent(%v)"

	EventReason = "PGController"
)

Variables

This section is empty.

Functions

func GetAllPods

func GetAllPods(podLister corelister.PodLister, pgNamespace, pgName string) ([]*v1.Pod, error)

func GetPodGroupConditionTimeStampByPhase

func GetPodGroupConditionTimeStampByPhase(pg *schedulingv1a1.PodGroup, phase schedulingv1a1.PodGroupPhase) metav1.Time

func GetPodGroupScheduleStartTime

func GetPodGroupScheduleStartTime(pg *schedulingv1a1.PodGroup) metav1.Time

func SetupPodGroupController

func SetupPodGroupController(
	ctx context.Context,
	client kubernetes.Interface,
	pgClient pgclientset.Interface,
	pgInformer schedinformer.PodGroupInformer,
)

SetupPodGroupController returns a new *PodGroupController

Types

type Msg

type Msg int
const (
	CreatedUnsatisfied   Msg = iota // created < min
	ScheduledUnsatisfied            // created >= min && scheduled < min
	ScheduledSatisfied              // created >= min && scheduled >= min || PodRunning || PodSucceeded || PodFailed
	TimeoutSatisfied                // PodGroup timeout since create timestamp
)

type PodGroupController

type PodGroupController struct {
	// contains filtered or unexported fields
}

PodGroupController is a controller that process pod groups using provided Handler interface

func (*PodGroupController) Run

func (ctrl *PodGroupController) Run(workers int, stopCh <-chan struct{})

Run starts listening on channel events

Jump to

Keyboard shortcuts

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