Documentation ¶
Index ¶
- Constants
- Variables
- func CheckCondition(job *v1beta2.PyTorchJob, condition common.JobConditionType, reason string) bool
- func ConvertPyTorchJobToUnstructured(job *v1beta2.PyTorchJob) (*unstructured.Unstructured, error)
- func GenLabels(jobName string) map[string]string
- func GenOwnerReference(job *v1beta2.PyTorchJob) *metav1.OwnerReference
- func GetKey(job *v1beta2.PyTorchJob, t *testing.T) string
- func NewBasePod(name string, job *v1beta2.PyTorchJob, t *testing.T) *v1.Pod
- func NewBaseService(name string, job *v1beta2.PyTorchJob, t *testing.T) *v1.Service
- func NewPod(job *v1beta2.PyTorchJob, typ string, index int, t *testing.T) *v1.Pod
- func NewPodList(count int32, status v1.PodPhase, job *v1beta2.PyTorchJob, typ string, ...) []*v1.Pod
- func NewPyTorchJob(worker int) *v1beta2.PyTorchJob
- func NewPyTorchJobWithActiveDeadlineSeconds(master, worker int, ads *int64) *v1beta2.PyTorchJob
- func NewPyTorchJobWithBackoffLimit(master, worker int, backoffLimit *int32) *v1beta2.PyTorchJob
- func NewPyTorchJobWithCleanPolicy(master, worker int, policy common.CleanPodPolicy) *v1beta2.PyTorchJob
- func NewPyTorchJobWithCleanupJobDelay(master, worker int, ttl *int32) *v1beta2.PyTorchJob
- func NewPyTorchJobWithMaster(worker int) *v1beta2.PyTorchJob
- func NewPyTorchReplicaSpecTemplate() v1.PodTemplateSpec
- func NewService(job *v1beta2.PyTorchJob, typ string, index int, t *testing.T) *v1.Service
- func NewServiceList(count int32, job *v1beta2.PyTorchJob, typ string, t *testing.T) []*v1.Service
- func SetPodsStatuses(podIndexer cache.Indexer, job *v1beta2.PyTorchJob, typ string, ...)
- func SetPyTorchJobCompletionTime(job *v1beta2.PyTorchJob)
- func SetServices(serviceIndexer cache.Indexer, job *v1beta2.PyTorchJob, typ string, ...)
Constants ¶
View Source
const ( TestImageName = "test-image-for-kubeflow-pytorch-operator:latest" TestPyTorchJobName = "test-pytorchjob" LabelWorker = "worker" LabelMaster = "master" SleepInterval = 500 * time.Millisecond ThreadCount = 1 )
View Source
const ( LabelGroupName = "group-name" LabelPyTorchJobName = "pytorch-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 GroupName = v1beta2.GroupName )
View Source
var (
AlwaysReady = func() bool { return true }
)
Functions ¶
func CheckCondition ¶
func CheckCondition(job *v1beta2.PyTorchJob, condition common.JobConditionType, reason string) bool
func ConvertPyTorchJobToUnstructured ¶
func ConvertPyTorchJobToUnstructured(job *v1beta2.PyTorchJob) (*unstructured.Unstructured, error)
ConvertPyTorchJobToUnstructured uses JSON to convert PyTorchJob to Unstructured.
func GenOwnerReference ¶
func GenOwnerReference(job *v1beta2.PyTorchJob) *metav1.OwnerReference
func NewBasePod ¶
func NewBaseService ¶
func NewPodList ¶
func NewPodList(count int32, status v1.PodPhase, job *v1beta2.PyTorchJob, typ string, start int32, t *testing.T) []*v1.Pod
create count pods with the given phase for the given job
func NewPyTorchJob ¶
func NewPyTorchJob(worker int) *v1beta2.PyTorchJob
func NewPyTorchJobWithActiveDeadlineSeconds ¶
func NewPyTorchJobWithActiveDeadlineSeconds(master, worker int, ads *int64) *v1beta2.PyTorchJob
func NewPyTorchJobWithBackoffLimit ¶
func NewPyTorchJobWithBackoffLimit(master, worker int, backoffLimit *int32) *v1beta2.PyTorchJob
func NewPyTorchJobWithCleanPolicy ¶
func NewPyTorchJobWithCleanPolicy(master, worker int, policy common.CleanPodPolicy) *v1beta2.PyTorchJob
func NewPyTorchJobWithCleanupJobDelay ¶
func NewPyTorchJobWithCleanupJobDelay(master, worker int, ttl *int32) *v1beta2.PyTorchJob
func NewPyTorchJobWithMaster ¶
func NewPyTorchJobWithMaster(worker int) *v1beta2.PyTorchJob
func NewPyTorchReplicaSpecTemplate ¶
func NewPyTorchReplicaSpecTemplate() v1.PodTemplateSpec
func NewService ¶
func NewServiceList ¶
NewServiceList creates count pods with the given phase for the given job
func SetPodsStatuses ¶
func SetPyTorchJobCompletionTime ¶
func SetPyTorchJobCompletionTime(job *v1beta2.PyTorchJob)
func SetServices ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.