v1

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestImageName = "test-image-for-kubeflow-common:latest"
	TestJobName   = "test-job"
	LabelWorker   = "worker"

	SleepInterval = 500 * time.Millisecond
	ThreadCount   = 1
)
View Source
const (
	LabelGroupName   = "group-name"
	LabelTestJobName = "test-job-name"
)

Variables

View Source
var (
	// KeyFunc is the short name to DeletionHandlingMetaNamespaceKeyFunc.
	// IndexerInformer uses a delta queue, therefore for deletes we have to use this
	// key function but it should be just fine for non delete events.
	KeyFunc       = cache.DeletionHandlingMetaNamespaceKeyFunc
	TestGroupName = testjobv1.GroupName
)
View Source
var (
	AlwaysReady = func() bool { return true }
)

Functions

func CheckCondition

func CheckCondition(testJob *testjobv1.TestJob, condition apiv1.JobConditionType, reason string) bool

func GenLabels

func GenLabels(jobName string) map[string]string

func GenOwnerReference

func GenOwnerReference(testjob *testjobv1.TestJob) *metav1.OwnerReference

func GetKey

func GetKey(testJob *testjobv1.TestJob, t *testing.T) string

func NewBasePod

func NewBasePod(name string, testJob *testjobv1.TestJob, t *testing.T) *v1.Pod

func NewBaseService

func NewBaseService(name string, testJob *testjobv1.TestJob, t *testing.T) *v1.Service

func NewPod

func NewPod(testJob *testjobv1.TestJob, typ string, index int, t *testing.T) *v1.Pod

func NewPodList

func NewPodList(count int32, status v1.PodPhase, testJob *testjobv1.TestJob, typ string, start int32, t *testing.T) []*v1.Pod

create count pods with the given phase for the given testjob

func NewService

func NewService(testJob *testjobv1.TestJob, typ string, index int, t *testing.T) *v1.Service

func NewServiceList

func NewServiceList(count int32, testJob *testjobv1.TestJob, typ string, t *testing.T) []*v1.Service

NewServiceList creates count pods with the given phase for the given Job

func NewTestJob

func NewTestJob(worker int) *testjobv1.TestJob

func NewTestReplicaSpecTemplate

func NewTestReplicaSpecTemplate() v1.PodTemplateSpec

func SetPodsStatuses

func SetPodsStatuses(podIndexer cache.Indexer, testJob *testjobv1.TestJob, typ string, pendingPods, activePods, succeededPods, failedPods int32, restartCounts []int32, t *testing.T)

func SetServices

func SetServices(serviceIndexer cache.Indexer, testJob *testjobv1.TestJob, typ string, activeWorkerServices int32, t *testing.T)

func SetTestJobCompletionTime

func SetTestJobCompletionTime(testJob *testjobv1.TestJob)

Types

This section is empty.

Jump to

Keyboard shortcuts

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