mpijob

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 18 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) string

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

type MPIJob kubeflow.MPIJob

func (*MPIJob) Finished

func (j *MPIJob) Finished() (metav1.Condition, 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) 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

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

func (*MPIJobWebhook) Default

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

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

Jump to

Keyboard shortcuts

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