Documentation ¶
Index ¶
- func LegacyMPIJobToV1MPIJob(mpiJob *training.MPIJob) error
- type MPIJobReconciler
- func (r *MPIJobReconciler) ControllerName() string
- func (r *MPIJobReconciler) DeleteJob(job interface{}) error
- func (r *MPIJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *MPIJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *MPIJobReconciler) GetDefaultContainerName() string
- func (r *MPIJobReconciler) GetDefaultContainerPortName() string
- func (r *MPIJobReconciler) GetDefaultContainerPortNumber() int32
- func (r *MPIJobReconciler) GetGroupNameLabelValue() string
- func (r *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *MPIJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
- func (r *MPIJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *MPIJobReconciler) GetReconcileOrders() []v1.ReplicaType
- func (r *MPIJobReconciler) GetServicesForJob(job interface{}) ([]*corev1.Service, error)
- func (r *MPIJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
- func (r *MPIJobReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MPIJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, ...) error
- func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, ...) error
- func (r *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LegacyMPIJobToV1MPIJob ¶
LegacyMPIJobToV1MPIJob handles legacy fields deserialized from json object and transferred to a combined v1 mpi-job to be reconciled.
Types ¶
type MPIJobReconciler ¶
type MPIJobReconciler struct { client.Client utilruntime.EmptyScaleImpl // contains filtered or unexported fields }
MPIJobReconciler reconciles a MPIJob object.
func NewReconciler ¶
func NewReconciler(mgr ctrl.Manager, config options.JobControllerConfiguration) *MPIJobReconciler
NewReconciler returns a new reconcile.Reconciler
func (*MPIJobReconciler) ControllerName ¶
func (r *MPIJobReconciler) ControllerName() string
ControllerName returns the Controller name
func (*MPIJobReconciler) DeleteJob ¶
func (r *MPIJobReconciler) DeleteJob(job interface{}) error
func (*MPIJobReconciler) GetAPIGroupVersion ¶
func (r *MPIJobReconciler) GetAPIGroupVersion() schema.GroupVersion
GetAPIGroupVersion returns the GroupVersion of the API
func (*MPIJobReconciler) GetAPIGroupVersionKind ¶
func (r *MPIJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
GetAPIGroupVersionKind returns the GroupVersionKind of the API
func (*MPIJobReconciler) GetDefaultContainerName ¶
func (r *MPIJobReconciler) GetDefaultContainerName() string
GetDefaultContainerName returns the default container name in pod
func (*MPIJobReconciler) GetDefaultContainerPortName ¶
func (r *MPIJobReconciler) GetDefaultContainerPortName() string
GetDefaultContainerPortName Get the default container port name
func (*MPIJobReconciler) GetDefaultContainerPortNumber ¶
func (r *MPIJobReconciler) GetDefaultContainerPortNumber() int32
GetDefaultContainerPortNumber get the default container port number
func (*MPIJobReconciler) GetGroupNameLabelValue ¶
func (r *MPIJobReconciler) GetGroupNameLabelValue() string
GetGroupNameLabelValue returns the Group Name(value) in the labels of the job
func (*MPIJobReconciler) GetJobFromAPIClient ¶
func (r *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
func (*MPIJobReconciler) GetJobFromInformerCache ¶
func (r *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
func (*MPIJobReconciler) GetNodeForModelOutput ¶ added in v0.4.0
func (r *MPIJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
func (*MPIJobReconciler) GetPodsForJob ¶
func (r *MPIJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
func (*MPIJobReconciler) GetReconcileOrders ¶
func (r *MPIJobReconciler) GetReconcileOrders() []v1.ReplicaType
Get replicas reconcile orders so that replica type with higher priority can be created earlier.
func (*MPIJobReconciler) GetServicesForJob ¶
func (r *MPIJobReconciler) GetServicesForJob(job interface{}) ([]*corev1.Service, error)
func (*MPIJobReconciler) IsMasterRole ¶
func (r *MPIJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
IsMasterRole returns if this replica type with index specified is a master role. MasterRole pod will have "job-role=master" set in its label
func (*MPIJobReconciler) Reconcile ¶
Reconcile reads that state of the cluster for a MPIJob object and makes changes based on the state read and what is in the MPIJob.Spec
func (*MPIJobReconciler) SetClusterSpec ¶
func (r *MPIJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, rt, index string) error
SetClusterSpec generates and sets for the given podTemplateSpec.
func (*MPIJobReconciler) SetupWithManager ¶
func (r *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setup reconciler to the Manager with default RBAC. The Manager will set fields on the Controller and Start it when the Manager is Started.
func (*MPIJobReconciler) UpdateJobStatus ¶
func (r *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error
func (*MPIJobReconciler) UpdateJobStatusInApiServer ¶
func (r *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error