testutil

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DummyContainerName  = "dummy"
	DummyContainerImage = "dummy/dummy:latest"
)
View Source
const (
	DummyPortName string = "dummy"
	DummyPort     int32  = 1221
)
View Source
const TestTFJobName = "test-tfjob"

Variables

This section is empty.

Functions

func CheckCondition

func CheckCondition(tfJob *kubeflowv1.TFJob, condition kubeflowv1.JobConditionType, reason string) bool

func NewBasePod

func NewBasePod(name string, job metav1.Object, refs []metav1.OwnerReference) *corev1.Pod

func NewBaseService

func NewBaseService(name string, job metav1.Object, refs []metav1.OwnerReference) *corev1.Service

func NewPod

func NewPod(job metav1.Object, typ kubeflowv1.ReplicaType, index int, refs []metav1.OwnerReference) *corev1.Pod

func NewPodList

func NewPodList(count int32, status corev1.PodPhase, job metav1.Object, typ kubeflowv1.ReplicaType, start int32, refs []metav1.OwnerReference) []*corev1.Pod

NewPodList create count pods with the given phase for the given tfJob

func NewService

func NewService(job metav1.Object, typ kubeflowv1.ReplicaType, index int, refs []metav1.OwnerReference) *corev1.Service

func NewServiceList

func NewServiceList(count int32, job metav1.Object, typ kubeflowv1.ReplicaType, refs []metav1.OwnerReference) []*corev1.Service

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

func NewTFJob

func NewTFJob(worker, ps int) *kubeflowv1.TFJob

func NewTFJobV2

func NewTFJobV2(worker, ps, master, chief, evaluator int) *kubeflowv1.TFJob

func NewTFJobWithActiveDeadlineSeconds

func NewTFJobWithActiveDeadlineSeconds(chief, worker, ps int, ads *int64) *kubeflowv1.TFJob

func NewTFJobWithBackoffLimit

func NewTFJobWithBackoffLimit(chief, worker, ps int, backoffLimit *int32) *kubeflowv1.TFJob

func NewTFJobWithChief

func NewTFJobWithChief(worker, ps int) *kubeflowv1.TFJob

func NewTFJobWithCleanPolicy

func NewTFJobWithCleanPolicy(chief, worker, ps int, policy kubeflowv1.CleanPodPolicy) *kubeflowv1.TFJob

func NewTFJobWithCleanupJobDelay

func NewTFJobWithCleanupJobDelay(chief, worker, ps int, ttl *int32) *kubeflowv1.TFJob

func NewTFJobWithEvaluator

func NewTFJobWithEvaluator(worker, ps, evaluator int) *kubeflowv1.TFJob

func NewTFJobWithEvaluatorAndNamespace

func NewTFJobWithEvaluatorAndNamespace(worker, ps, evaluator int, ns string) *kubeflowv1.TFJob

func NewTFJobWithNamespace

func NewTFJobWithNamespace(worker, ps int, ns string) *kubeflowv1.TFJob

func NewTFJobWithSuccessPolicy

func NewTFJobWithSuccessPolicy(worker, ps int, successPolicy kubeflowv1.SuccessPolicy) *kubeflowv1.TFJob

func NewTFReplicaSpecTemplate

func NewTFReplicaSpecTemplate() v1.PodTemplateSpec

func SetPodsStatuses

func SetPodsStatuses(client client.Client, job metav1.Object, typ kubeflowv1.ReplicaType,
	pendingPods, activePods, succeededPods, failedPods int32, restartCounts []int32,
	refs []metav1.OwnerReference, basicLabels map[string]string)

func SetServices

func SetServices(client client.Client, job metav1.Object, typ kubeflowv1.ReplicaType, activeWorkerServices int32,
	refs []metav1.OwnerReference, basicLabels map[string]string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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