Documentation ¶
Index ¶
- Constants
- Variables
- func CheckCondition(tfJob *tfv1beta1.TFJob, condition common.JobConditionType, reason string) bool
- func ConvertTFJobToUnstructured(tfJob *tfv1beta1.TFJob) (*unstructured.Unstructured, error)
- func GenLabels(jobName string) map[string]string
- func GenOwnerReference(tfjob *tfv1beta1.TFJob) *metav1.OwnerReference
- func GetKey(tfJob *tfv1beta1.TFJob, t *testing.T) string
- func NewBasePod(name string, tfJob *tfv1beta1.TFJob, t *testing.T) *v1.Pod
- func NewBaseService(name string, tfJob *tfv1beta1.TFJob, t *testing.T) *v1.Service
- func NewPod(tfJob *tfv1beta1.TFJob, typ string, index int, t *testing.T) *v1.Pod
- func NewPodList(count int32, status v1.PodPhase, tfJob *tfv1beta1.TFJob, typ string, ...) []*v1.Pod
- func NewService(tfJob *tfv1beta1.TFJob, typ string, index int, t *testing.T) *v1.Service
- func NewServiceList(count int32, tfJob *tfv1beta1.TFJob, typ string, t *testing.T) []*v1.Service
- func NewTFJob(worker, ps int) *tfv1beta1.TFJob
- func NewTFJobWithChief(worker, ps int) *tfv1beta1.TFJob
- func NewTFJobWithCleanPolicy(chief, worker, ps int, policy common.CleanPodPolicy) *tfv1beta1.TFJob
- func NewTFJobWithCleanupJobDelay(chief, worker, ps int, ttl *int32) *tfv1beta1.TFJob
- func NewTFJobWithEvaluator(worker, ps, evaluator int) *tfv1beta1.TFJob
- func NewTFJobWithEvaluatorAndNamespace(worker, ps, evaluator int, ns string) *tfv1beta1.TFJob
- func NewTFJobWithNamespace(worker, ps int, ns string) *tfv1beta1.TFJob
- func NewTFReplicaSpecTemplate() v1.PodTemplateSpec
- func SetPodsStatuses(podIndexer cache.Indexer, tfJob *tfv1beta1.TFJob, typ string, ...)
- func SetServices(serviceIndexer cache.Indexer, tfJob *tfv1beta1.TFJob, typ string, ...)
- func SetTFJobCompletionTime(tfJob *tfv1beta1.TFJob)
Constants ¶
View Source
const ( TestImageName = "test-image-for-kubeflow-tf-operator:latest" TestTFJobName = "test-tfjob" LabelWorker = "worker" LabelPS = "ps" SleepInterval = 500 * time.Millisecond ThreadCount = 1 )
View Source
const ( LabelGroupName = "group-name" LabelTFJobName = "tf-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 = tfv1beta1.GroupName )
View Source
var (
AlwaysReady = func() bool { return true }
)
Functions ¶
func CheckCondition ¶
func ConvertTFJobToUnstructured ¶
func ConvertTFJobToUnstructured(tfJob *tfv1beta1.TFJob) (*unstructured.Unstructured, error)
ConvertTFJobToUnstructured uses JSON to convert TFJob to Unstructured.
func GenOwnerReference ¶
func GenOwnerReference(tfjob *tfv1beta1.TFJob) *metav1.OwnerReference
func NewBaseService ¶
func NewPodList ¶
func NewPodList(count int32, status v1.PodPhase, tfJob *tfv1beta1.TFJob, typ string, start int32, t *testing.T) []*v1.Pod
create count pods with the given phase for the given tfJob
func NewService ¶
func NewServiceList ¶
NewServiceList creates count pods with the given phase for the given tfJob
func NewTFJobWithChief ¶
func NewTFJobWithCleanPolicy ¶
func NewTFJobWithCleanPolicy(chief, worker, ps int, policy common.CleanPodPolicy) *tfv1beta1.TFJob
func NewTFJobWithEvaluator ¶
func NewTFReplicaSpecTemplate ¶
func NewTFReplicaSpecTemplate() v1.PodTemplateSpec
func SetPodsStatuses ¶
func SetServices ¶
func SetTFJobCompletionTime ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.