Documentation
¶
Index ¶
- Constants
- Variables
- func CheckCondition(tfJob *kubeflowv1.TFJob, condition commonv1.JobConditionType, reason string) bool
- func ConvertTFJobToUnstructured(tfJob *kubeflowv1.TFJob) (*unstructured.Unstructured, error)
- func GenOwnerReference(job metav1.Object, apiVersion string, kind string) *metav1.OwnerReference
- func GetKey(tfJob *kubeflowv1.TFJob, t *testing.T) string
- func NewBasePod(name string, job metav1.Object, refs []metav1.OwnerReference) *corev1.Pod
- func NewBaseService(name string, job metav1.Object, refs []metav1.OwnerReference) *corev1.Service
- func NewPod(job metav1.Object, typ string, index int, refs []metav1.OwnerReference) *corev1.Pod
- func NewPodList(count int32, status corev1.PodPhase, job metav1.Object, typ string, ...) []*corev1.Pod
- func NewService(job metav1.Object, typ string, index int, refs []metav1.OwnerReference) *corev1.Service
- func NewServiceList(count int32, job metav1.Object, typ string, refs []metav1.OwnerReference) []*corev1.Service
- func NewTFJob(worker, ps int) *kubeflowv1.TFJob
- func NewTFJobV2(worker, ps, master, chief, evaluator int) *kubeflowv1.TFJob
- func NewTFJobWithActiveDeadlineSeconds(chief, worker, ps int, ads *int64) *kubeflowv1.TFJob
- func NewTFJobWithBackoffLimit(chief, worker, ps int, backoffLimit *int32) *kubeflowv1.TFJob
- func NewTFJobWithChief(worker, ps int) *kubeflowv1.TFJob
- func NewTFJobWithCleanPolicy(chief, worker, ps int, policy commonv1.CleanPodPolicy) *kubeflowv1.TFJob
- func NewTFJobWithCleanupJobDelay(chief, worker, ps int, ttl *int32) *kubeflowv1.TFJob
- func NewTFJobWithEvaluator(worker, ps, evaluator int) *kubeflowv1.TFJob
- func NewTFJobWithEvaluatorAndNamespace(worker, ps, evaluator int, ns string) *kubeflowv1.TFJob
- func NewTFJobWithNamespace(worker, ps int, ns string) *kubeflowv1.TFJob
- func NewTFJobWithSuccessPolicy(worker, ps int, successPolicy kubeflowv1.SuccessPolicy) *kubeflowv1.TFJob
- func NewTFReplicaSpecTemplate() v1.PodTemplateSpec
- func SetPodsStatuses(client client.Client, job metav1.Object, typ string, ...)
- func SetServices(client client.Client, job metav1.Object, typ string, ...)
- func SetTFJobCompletionTime(tfJob *kubeflowv1.TFJob)
Constants ¶
View Source
const ( TestImageName = "test-image-for-kubeflow-training-operator:latest" TestTFJobName = "test-tfjob" LabelWorker = "worker" LabelPS = "ps" LabelChief = "chief" TFJobKind = "TFJob" SleepInterval = 500 * time.Millisecond ThreadCount = 1 )
View Source
const ( DummyContainerName = "dummy" DummyContainerImage = "dummy/dummy:latest" )
View Source
const ( DummyPortName string = "dummy" DummyPort int32 = 1221 )
View Source
const ( LabelGroupName = "group-name" JobNameLabel = "job-name" // Deprecated label. Has to be removed later DeprecatedLabelTFJobName = "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 = kubeflowv1.GroupVersion.Group ControllerName = "training-operator" )
View Source
var (
AlwaysReady = func() bool { return true }
)
Functions ¶
func CheckCondition ¶
func CheckCondition(tfJob *kubeflowv1.TFJob, condition commonv1.JobConditionType, reason string) bool
func ConvertTFJobToUnstructured ¶
func ConvertTFJobToUnstructured(tfJob *kubeflowv1.TFJob) (*unstructured.Unstructured, error)
ConvertTFJobToUnstructured uses function ToUnstructured to convert TFJob to Unstructured.
func GenOwnerReference ¶
func NewBasePod ¶
func NewBaseService ¶
func NewPodList ¶
func NewPodList(count int32, status corev1.PodPhase, job metav1.Object, typ string, start int32, refs []metav1.OwnerReference) []*corev1.Pod
NewPodList create count pods with the given phase for the given tfJob
func NewService ¶
func NewServiceList ¶
func NewServiceList(count int32, job metav1.Object, typ string, 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 ¶ added in v1.4.0
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 commonv1.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 ¶ added in v1.4.0
func NewTFJobWithSuccessPolicy(worker, ps int, successPolicy kubeflowv1.SuccessPolicy) *kubeflowv1.TFJob
func NewTFReplicaSpecTemplate ¶
func NewTFReplicaSpecTemplate() v1.PodTemplateSpec
func SetPodsStatuses ¶
func SetServices ¶
func SetTFJobCompletionTime ¶
func SetTFJobCompletionTime(tfJob *kubeflowv1.TFJob)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.