Documentation ¶
Index ¶
- Variables
- func GetWorkloadNameForMPIJob(jobName string) string
- func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
- func SetupMPIJobWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
- type MPIJob
- func (j *MPIJob) Finished() (metav1.Condition, bool)
- func (j *MPIJob) GVK() schema.GroupVersionKind
- func (j *MPIJob) IsActive() bool
- func (j *MPIJob) IsSuspended() bool
- func (j *MPIJob) Object() client.Object
- func (j *MPIJob) PodSets() []kueue.PodSet
- func (j *MPIJob) PodsReady() bool
- func (j *MPIJob) PriorityClass() string
- func (j *MPIJob) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
- func (j *MPIJob) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
- func (j *MPIJob) Suspend()
- type MPIJobWebhook
- func (w *MPIJobWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *MPIJobWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *MPIJobWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (w *MPIJobWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
var (
FrameworkName = "kubeflow.org/mpijob"
)
var NewReconciler = jobframework.NewGenericReconcilerFactory(func() jobframework.GenericJob { return &MPIJob{} })
Functions ¶
func SetupIndexes ¶
func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
func SetupMPIJobWebhook ¶
func SetupMPIJobWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
SetupMPIJobWebhook configures the webhook for kubeflow MPIJob.
Types ¶
type MPIJob ¶
func (*MPIJob) GVK ¶ added in v0.5.0
func (j *MPIJob) GVK() schema.GroupVersionKind
func (*MPIJob) IsSuspended ¶
func (*MPIJob) PriorityClass ¶
PriorityClass calculates the priorityClass name needed for workload according to the following priorities:
- .spec.runPolicy.schedulingPolicy.priorityClass
- .spec.mpiReplicaSpecs[Launcher].template.spec.priorityClassName
- .spec.mpiReplicaSpecs[Worker].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 (*MPIJob) RestorePodSetsInfo ¶ added in v0.4.0
func (j *MPIJob) RestorePodSetsInfo(podSetsInfo []podset.PodSetInfo) bool
func (*MPIJob) RunWithPodSetsInfo ¶ added in v0.4.0
func (j *MPIJob) RunWithPodSetsInfo(podSetsInfo []podset.PodSetInfo) error
type MPIJobWebhook ¶
type MPIJobWebhook struct {
// contains filtered or unexported fields
}
func (*MPIJobWebhook) Default ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateCreate ¶
func (w *MPIJobWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateDelete ¶
func (w *MPIJobWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateUpdate ¶
func (w *MPIJobWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type