util

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertServiceList

func ConvertServiceList(list []corev1.Service) []*corev1.Service

ConvertServiceList convert service list to service point list

func DurationUntilExpireTime added in v1.5.0

func DurationUntilExpireTime(runPolicy *kubeflowv1.RunPolicy, jobStatus kubeflowv1.JobStatus) (time.Duration, error)

DurationUntilExpireTime returns the duration until job needs to be cleaned up, or -1 if it's infinite.

func GenExpectationGenericKey

func GenExpectationGenericKey(jobKey string, replicaType string, pl string) string

GenExpectationGenericKey generates an expectation key for {Kind} of a job

func GetSchedulerName

func GetSchedulerName(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec) string

func IsGangSchedulerSet

func IsGangSchedulerSet(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, schedulerName string) bool

func JobControlledPodList added in v1.7.0

func JobControlledPodList(list []corev1.Pod, job metav1.Object) []*corev1.Pod

JobControlledPodList filter pod list owned by the job.

func LoggerForGenericKind

func LoggerForGenericKind(obj metav1.Object, kind string) *log.Entry

LoggerForGenericKind generates log entry for generic Kubernetes resource Kind

func OnDependentCreateFunc

func OnDependentCreateFunc(exp expectation.ControllerExpectationsInterface) func(event.CreateEvent) bool

OnDependentCreateFunc modify expectations when dependent (pod/service) creation observed.

func OnDependentCreateFuncGeneric

func OnDependentCreateFuncGeneric(exp expectation.ControllerExpectationsInterface) func(event.CreateEvent) bool

OnDependentCreateFuncGeneric modify expectations when dependent (pod/service) creation observed.

func OnDependentDeleteFunc

func OnDependentDeleteFunc(exp expectation.ControllerExpectationsInterface) func(event.DeleteEvent) bool

OnDependentDeleteFunc modify expectations when dependent (pod/service) deletion observed.

func OnDependentDeleteFuncGeneric

func OnDependentDeleteFuncGeneric(exp expectation.ControllerExpectationsInterface) func(event.DeleteEvent) bool

OnDependentDeleteFuncGeneric modify expectations when dependent (pod/service) deletion observed.

func OnDependentUpdateFunc

func OnDependentUpdateFunc(jc *common.JobController) func(updateEvent event.UpdateEvent) bool

OnDependentUpdateFunc modify expectations when dependent (pod/service) update observed.

func OnDependentUpdateFuncGeneric

func OnDependentUpdateFuncGeneric(jc *common.JobController) func(updateEvent event.UpdateEvent) bool

OnDependentUpdateFuncGeneric modify expectations when dependent (pod/service) update observed.

func SatisfiedExpectations

func SatisfiedExpectations(exp expectation.ControllerExpectationsInterface, jobKey string, replicaTypes []kubeflowv1.ReplicaType) bool

SatisfiedExpectations returns true if the required adds/dels for the given mxjob have been observed. Add/del counts are established by the controller at sync time, and updated as controllees are observed by the controller manager.

Types

type FakeWorkQueue

type FakeWorkQueue struct{}

FakeWorkQueue implements RateLimitingInterface but actually does nothing.

func (*FakeWorkQueue) Add

func (f *FakeWorkQueue) Add(item interface{})

Add WorkQueue Add method

func (*FakeWorkQueue) AddAfter

func (f *FakeWorkQueue) AddAfter(item interface{}, duration time.Duration)

AddAfter WorkQueue AddAfter method

func (*FakeWorkQueue) AddRateLimited

func (f *FakeWorkQueue) AddRateLimited(item interface{})

AddRateLimited WorkQueue AddRateLimited method

func (*FakeWorkQueue) Done

func (f *FakeWorkQueue) Done(item interface{})

Done WorkQueue Done method

func (*FakeWorkQueue) Forget

func (f *FakeWorkQueue) Forget(item interface{})

Forget WorkQueue Forget method

func (*FakeWorkQueue) Get

func (f *FakeWorkQueue) Get() (item interface{}, shutdown bool)

Get WorkQueue Get method

func (*FakeWorkQueue) Len

func (f *FakeWorkQueue) Len() int

Len WorkQueue Len method

func (*FakeWorkQueue) NumRequeues

func (f *FakeWorkQueue) NumRequeues(item interface{}) int

NumRequeues WorkQueue NumRequeues method

func (*FakeWorkQueue) ShutDown

func (f *FakeWorkQueue) ShutDown()

ShutDown WorkQueue ShutDown method

func (*FakeWorkQueue) ShutDownWithDrain added in v1.5.0

func (f *FakeWorkQueue) ShutDownWithDrain()

ShutDown WorkQueue ShutDownWithDrain method

func (*FakeWorkQueue) ShuttingDown

func (f *FakeWorkQueue) ShuttingDown() bool

ShuttingDown WorkQueue ShuttingDown method

type ObjectFilterFunction added in v1.5.0

type ObjectFilterFunction func(obj metav1.Object) bool

Jump to

Keyboard shortcuts

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