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
- func WebhookType() runtime.Object
- type MPIJob
- func (j *MPIJob) EquivalentToWorkload(wl kueue.Workload) bool
- func (j *MPIJob) Finished() (metav1.Condition, bool)
- func (j *MPIJob) GetGVK() 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) ResetStatus() bool
- func (j *MPIJob) RestoreNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)
- func (j *MPIJob) RunWithNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)
- func (j *MPIJob) Suspend()
- type MPIJobReconciler
- type MPIJobWebhook
- func (w *MPIJobWebhook) Default(ctx context.Context, obj runtime.Object) error
- func (w *MPIJobWebhook) ValidateCreate(ctx context.Context, obj runtime.Object) error
- func (w *MPIJobWebhook) ValidateDelete(ctx context.Context, obj runtime.Object) error
- func (w *MPIJobWebhook) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) error
Constants ¶
This section is empty.
Variables ¶
var (
FrameworkName = "kubeflow.org/mpijob"
)
Functions ¶
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 ¶
Types ¶
type MPIJob ¶
func (*MPIJob) GetGVK ¶
func (j *MPIJob) GetGVK() schema.GroupVersionKind
func (*MPIJob) IsSuspended ¶
func (*MPIJob) PriorityClass ¶
calcPriorityClassName calculates the priorityClass name needed for workload according to the following priorities:
- .spec.runPolicy.schedulingPolicy.priorityClass
- .spec.mpiReplicaSecs[Launcher].template.spec.priorityClassName
- .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 (*MPIJob) RestoreNodeAffinity ¶
func (j *MPIJob) RestoreNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)
func (*MPIJob) RunWithNodeAffinity ¶
func (j *MPIJob) RunWithNodeAffinity(nodeSelectors []jobframework.PodSetNodeSelector)
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) 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 ¶
Default implements webhook.CustomDefaulter so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateCreate ¶
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateDelete ¶
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type
func (*MPIJobWebhook) ValidateUpdate ¶
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type