Documentation ¶
Index ¶
- func NewMKAdapter[PtrT objAsPtr[T], T any](copySpec func(dst, src PtrT), copyStatus func(dst, src PtrT), ...) fullInterface
- type KFJobControl
- type KubeflowJob
- func (j *KubeflowJob) Finished() (message string, success, finished bool)
- func (j *KubeflowJob) GVK() schema.GroupVersionKind
- func (j *KubeflowJob) IsActive() bool
- func (j *KubeflowJob) IsSuspended() bool
- func (j *KubeflowJob) Object() client.Object
- func (j *KubeflowJob) OrderedReplicaTypes() []kftraining.ReplicaType
- func (j *KubeflowJob) PodLabelSelector() string
- func (j *KubeflowJob) PodSets() []kueue.PodSet
- func (j *KubeflowJob) PodsReady() bool
- func (j *KubeflowJob) PriorityClass() string
- func (j *KubeflowJob) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
- func (j *KubeflowJob) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
- func (j *KubeflowJob) Suspend()
- func (j *KubeflowJob) ValidateOnCreate() field.ErrorList
- func (j *KubeflowJob) ValidateOnUpdate(_ jobframework.GenericJob) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMKAdapter ¶ added in v0.9.0
func NewMKAdapter[PtrT objAsPtr[T], T any]( copySpec func(dst, src PtrT), copyStatus func(dst, src PtrT), emptyList func() client.ObjectList, gvk schema.GroupVersionKind, ) fullInterface
Types ¶
type KFJobControl ¶
type KFJobControl interface { // Object returns the KFJob interface. Object() client.Object // GVK returns the GroupVersionKind for the KFJob. GVK() schema.GroupVersionKind // RunPolicy returns the RunPolicy for the KFJob. RunPolicy() *kftraining.RunPolicy // ReplicaSpecs returns the ReplicaSpecs for the KFJob. ReplicaSpecs() map[kftraining.ReplicaType]*kftraining.ReplicaSpec // ReplicaSpecsFieldName returns the field name of the ReplicaSpecs. ReplicaSpecsFieldName() string // JobStatus returns the JobStatus for the KFJob. JobStatus() *kftraining.JobStatus // OrderedReplicaTypes returns the ordered list of ReplicaTypes for the KFJob. OrderedReplicaTypes() []kftraining.ReplicaType }
type KubeflowJob ¶
type KubeflowJob struct {
KFJobControl KFJobControl
}
func (*KubeflowJob) Finished ¶
func (j *KubeflowJob) Finished() (message string, success, finished bool)
func (*KubeflowJob) GVK ¶
func (j *KubeflowJob) GVK() schema.GroupVersionKind
func (*KubeflowJob) IsActive ¶
func (j *KubeflowJob) IsActive() bool
func (*KubeflowJob) IsSuspended ¶
func (j *KubeflowJob) IsSuspended() bool
func (*KubeflowJob) Object ¶
func (j *KubeflowJob) Object() client.Object
func (*KubeflowJob) OrderedReplicaTypes ¶
func (j *KubeflowJob) OrderedReplicaTypes() []kftraining.ReplicaType
func (*KubeflowJob) PodLabelSelector ¶ added in v0.9.0
func (j *KubeflowJob) PodLabelSelector() string
func (*KubeflowJob) PodSets ¶
func (j *KubeflowJob) PodSets() []kueue.PodSet
func (*KubeflowJob) PodsReady ¶
func (j *KubeflowJob) PodsReady() bool
func (*KubeflowJob) PriorityClass ¶
func (j *KubeflowJob) PriorityClass() string
PriorityClass calculates the priorityClass name needed for workload according to the following priorities:
- .spec.runPolicy.schedulingPolicy.priorityClass
- .spec.replicaSpecs[OrderedReplicaTypes[0]].template.spec.priorityClassName
- .spec.replicaSpecs[OrderedReplicaTypes[1]].template.spec.priorityClassName
- ...
This function is inspired by an analogous one in mpi-controller: https://github.com/kubeflow/mpi-operator/blob/5946ef4157599a474ab82ff80e780d5c2546c9ee/pkg/controller/podgroup.go#L69-L72
func (*KubeflowJob) RestorePodSetsInfo ¶
func (j *KubeflowJob) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
func (*KubeflowJob) RunWithPodSetsInfo ¶
func (j *KubeflowJob) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
func (*KubeflowJob) Suspend ¶
func (j *KubeflowJob) Suspend()
func (*KubeflowJob) ValidateOnCreate ¶ added in v0.9.0
func (j *KubeflowJob) ValidateOnCreate() field.ErrorList
func (*KubeflowJob) ValidateOnUpdate ¶ added in v0.9.0
func (j *KubeflowJob) ValidateOnUpdate(_ jobframework.GenericJob) field.ErrorList
Click to show internal directories.
Click to hide internal directories.