Documentation
¶
Index ¶
- Constants
- type MPIJobReconciler
- func (jc *MPIJobReconciler) ControllerName() string
- func (jc *MPIJobReconciler) DeleteJob(job interface{}) error
- func (jc *MPIJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (jc *MPIJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (jc *MPIJobReconciler) GetDefaultContainerName() string
- func (jc *MPIJobReconciler) GetDefaultContainerPortName() string
- func (jc *MPIJobReconciler) GetGroupNameLabelValue() string
- func (jc *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (jc *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (jc *MPIJobReconciler) GetPodsForJob(jobObject interface{}) ([]*corev1.Pod, error)
- func (jc *MPIJobReconciler) GetServicesForJob(jobObject interface{}) ([]*corev1.Service, error)
- func (jc *MPIJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) bool
- func (jc *MPIJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (jc *MPIJobReconciler) ReconcilePods(job interface{}, jobStatus *commonv1.JobStatus, pods []*corev1.Pod, ...) error
- func (jc *MPIJobReconciler) ReconcileServices(job metav1.Object, services []*corev1.Service, rtype commonv1.ReplicaType, ...) error
- func (jc *MPIJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- func (jc *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThreads int) error
- func (jc *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) error
- func (jc *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
Constants ¶
const ( // ErrResourceExists is used as part of the Event 'reason' when an MPIJob // fails to sync due to dependent resources of the same name already // existing. ErrResourceExists = "ErrResourceExists" // MessageResourceExists is the message used for Events when a resource // fails to sync due to dependent resources already existing. MessageResourceExists = "Resource %q of MPIJobKind %q already exists and is not managed by MPIJob" // ErrResourceDoesNotExist is used as part of the Event 'reason' when some // resource is missing in yaml ErrResourceDoesNotExist = "ErrResourceDoesNotExist" // MessageResourceDoesNotExist is used for Events when some // resource is missing in yaml MessageResourceDoesNotExist = "Resource %q is missing in yaml" )
const ( FailedDeleteJobReason = "FailedDeleteJob" SuccessfulDeleteJobReason = "SuccessfulDeleteJob" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MPIJobReconciler ¶
type MPIJobReconciler struct { common.JobController client.Client Scheme *runtime.Scheme Log logr.Logger // contains filtered or unexported fields }
MPIJobReconciler reconciles a MPIJob object
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, gangSchedulingSetupFunc common.GangSchedulingSetupFunc) *MPIJobReconciler
func (*MPIJobReconciler) ControllerName ¶
func (jc *MPIJobReconciler) ControllerName() string
func (*MPIJobReconciler) DeleteJob ¶
func (jc *MPIJobReconciler) DeleteJob(job interface{}) error
func (*MPIJobReconciler) GetAPIGroupVersion ¶
func (jc *MPIJobReconciler) GetAPIGroupVersion() schema.GroupVersion
func (*MPIJobReconciler) GetAPIGroupVersionKind ¶
func (jc *MPIJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
func (*MPIJobReconciler) GetDefaultContainerName ¶
func (jc *MPIJobReconciler) GetDefaultContainerName() string
func (*MPIJobReconciler) GetDefaultContainerPortName ¶
func (jc *MPIJobReconciler) GetDefaultContainerPortName() string
func (*MPIJobReconciler) GetGroupNameLabelValue ¶
func (jc *MPIJobReconciler) GetGroupNameLabelValue() string
func (*MPIJobReconciler) GetJobFromAPIClient ¶
func (jc *MPIJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
func (*MPIJobReconciler) GetJobFromInformerCache ¶
func (jc *MPIJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
func (*MPIJobReconciler) GetPodsForJob ¶
func (jc *MPIJobReconciler) GetPodsForJob(jobObject interface{}) ([]*corev1.Pod, error)
GetPodsForJob returns the set of pods that this job should manage. It also reconciles ControllerRef by adopting/orphaning. Note that the returned Pods are pointers into the cache.
func (*MPIJobReconciler) GetServicesForJob ¶
func (jc *MPIJobReconciler) GetServicesForJob(jobObject interface{}) ([]*corev1.Service, error)
GetServicesForJob returns the set of services that this job should manage. It also reconciles ControllerRef by adopting/orphaning. Note that the returned services are pointers into the cache.
func (*MPIJobReconciler) IsMasterRole ¶
func (jc *MPIJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool
func (*MPIJobReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*MPIJobReconciler) ReconcilePods ¶
func (jc *MPIJobReconciler) ReconcilePods( job interface{}, jobStatus *commonv1.JobStatus, pods []*corev1.Pod, rtype commonv1.ReplicaType, spec *commonv1.ReplicaSpec, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ) error
func (*MPIJobReconciler) ReconcileServices ¶
func (jc *MPIJobReconciler) ReconcileServices( job metav1.Object, services []*corev1.Service, rtype commonv1.ReplicaType, spec *commonv1.ReplicaSpec) error
ReconcileServices is overridden because mpi-reconciler.v1 does not need to reconcile services
func (*MPIJobReconciler) SetClusterSpec ¶
func (jc *MPIJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
SetClusterSpec is overridden because no cluster spec is needed for MPIJob
func (*MPIJobReconciler) SetupWithManager ¶
func (jc *MPIJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThreads int) error
SetupWithManager sets up the controller with the Manager.
func (*MPIJobReconciler) UpdateJobStatus ¶
func (jc *MPIJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, jobStatus *commonv1.JobStatus) error
func (*MPIJobReconciler) UpdateJobStatusInApiServer ¶
func (jc *MPIJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error