mpijob

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 17 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

SetupWebhook configures the webhook for kubeflow MPIJob.

func WebhookType

func WebhookType() runtime.Object

Types

type MPIJob

type MPIJob struct {
	kubeflow.MPIJob
}

func (*MPIJob) EquivalentToWorkload

func (j *MPIJob) EquivalentToWorkload(wl kueue.Workload) bool

func (*MPIJob) Finished

func (j *MPIJob) Finished() (metav1.Condition, bool)

func (*MPIJob) GetGVK

func (j *MPIJob) GetGVK() 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

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

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

func (j *MPIJob) ResetStatus() bool

func (*MPIJob) RestoreNodeAffinity

func (j *MPIJob) RestoreNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)

func (*MPIJob) RunWithNodeAffinity

func (j *MPIJob) RunWithNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)

func (*MPIJob) Suspend

func (j *MPIJob) Suspend()

type MPIJobReconciler

type MPIJobReconciler jobframework.JobReconciler

MPIJobReconciler reconciles a Job object

func NewReconciler

func NewReconciler(
	scheme *runtime.Scheme,
	client client.Client,
	record record.EventRecorder,
	opts ...jobframework.Option) *MPIJobReconciler

func (*MPIJobReconciler) Reconcile

func (r *MPIJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*MPIJobReconciler) SetupWithManager

func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager. It indexes workloads based on the owning jobs.

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) 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) 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) 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