Documentation ¶
Index ¶
- Variables
- func GetWorkloadNameForMPIJob(jobName string, jobUID types.UID) string
- func NewJob() jobframework.GenericJob
- func SetupIndexes(ctx context.Context, indexer client.FieldIndexer) error
- func SetupMPIJobWebhook(mgr ctrl.Manager, opts ...jobframework.Option) error
- type MPIJob
- func (j *MPIJob) Finished() (message string, success, finished 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) PodLabelSelector() string
- 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(context.Context, 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(NewJob)
Functions ¶
func NewJob ¶ added in v0.8.2
func NewJob() jobframework.GenericJob
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 MPIJob.
Types ¶
type MPIJob ¶
func (*MPIJob) GVK ¶ added in v0.5.0
func (j *MPIJob) GVK() schema.GroupVersionKind
func (*MPIJob) IsSuspended ¶
func (*MPIJob) PodLabelSelector ¶ added in v0.9.0
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 ¶ added in v0.9.0
type MpiJobWebhook struct {
// contains filtered or unexported fields
}
func (*MpiJobWebhook) Default ¶ added in v0.9.0
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*MpiJobWebhook) ValidateCreate ¶ added in v0.9.0
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 ¶ added in v0.9.0
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*MpiJobWebhook) ValidateUpdate ¶ added in v0.9.0
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