mpijob

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FrameworkName = "kubeflow.org/mpijob"
)

Functions

func GetWorkloadNameForMPIJob

func GetWorkloadNameForMPIJob(jobName string, jobUID types.UID) string

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

type MPIJob kfmpi.MPIJob

func (*MPIJob) Finished

func (j *MPIJob) Finished() (message string, success, finished bool)

func (*MPIJob) GVK added in v0.5.0

func (j *MPIJob) GVK() schema.GroupVersionKind

func (*MPIJob) IsActive

func (j *MPIJob) IsActive() bool

func (*MPIJob) IsSuspended

func (j *MPIJob) IsSuspended() bool

func (*MPIJob) Object

func (j *MPIJob) Object() client.Object

func (*MPIJob) PodLabelSelector added in v0.9.0

func (j *MPIJob) PodLabelSelector() string

func (*MPIJob) PodSets

func (j *MPIJob) PodSets() []kueue.PodSet

func (*MPIJob) PodsReady

func (j *MPIJob) PodsReady() bool

func (*MPIJob) PriorityClass

func (j *MPIJob) PriorityClass() string

PriorityClass calculates the priorityClass name needed for workload according to the following priorities:

  1. .spec.runPolicy.schedulingPolicy.priorityClass
  2. .spec.mpiReplicaSpecs[Launcher].template.spec.priorityClassName
  3. .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

func (*MPIJob) Suspend

func (j *MPIJob) Suspend()

type MpiJobWebhook added in v0.9.0

type MpiJobWebhook struct {
	// contains filtered or unexported fields
}

func (*MpiJobWebhook) Default added in v0.9.0

func (w *MpiJobWebhook) Default(ctx context.Context, obj runtime.Object) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL