Documentation ¶
Index ¶
- Variables
- func ContainSchedulerSpec(mxJob *mxnetv1.MXJob) bool
- func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- type ClusterSpec
- type LabelsSpec
- type MXConfig
- type MXJobReconciler
- func (r *MXJobReconciler) ControllerName() string
- func (r *MXJobReconciler) DeleteJob(job interface{}) error
- func (r *MXJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *MXJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *MXJobReconciler) GetDefaultContainerName() string
- func (r *MXJobReconciler) GetDefaultContainerPortName() string
- func (r *MXJobReconciler) GetGroupNameLabelValue() string
- func (r *MXJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *MXJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *MXJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *MXJobReconciler) GetServicesForJob(job interface{}) ([]*corev1.Service, error)
- func (r *MXJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) bool
- func (r *MXJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *MXJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- func (r *MXJobReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *MXJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) error
- func (r *MXJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
- type TaskSpec
- type UrlPort
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultCleanPodPolicy is the default clean pod policy controller assign the new Job if not exist DefaultCleanPodPolicy = commonv1.CleanPodPolicyNone )
Functions ¶
func ContainSchedulerSpec ¶
Types ¶
type ClusterSpec ¶
ClusterSpec represents a cluster Mxnet specification.
type MXConfig ¶
type MXConfig struct { // Cluster represents a Mxnet ClusterSpec. Cluster ClusterSpec `json:"cluster"` // Labels include all label of task. Labels LabelsSpec `json:"labels"` // Task include information of current node. Task TaskSpec `json:"task"` }
MXConfig is a struct representing the distributed Mxnet config. This struct is turned into an environment variable MX_CONFIG which is used by Mxnet processes to configure themselves.
type MXJobReconciler ¶
type MXJobReconciler struct { common.JobController client.Client Log logr.Logger Recorder record.EventRecorder Scheme *runtime.Scheme }
MXJobReconciler reconciles a MXJob object
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, enableGangScheduling bool) *MXJobReconciler
NewReconciler creates a MXJob Reconciler
func (*MXJobReconciler) ControllerName ¶
func (r *MXJobReconciler) ControllerName() string
Below is ControllerInterface's implementation
func (*MXJobReconciler) DeleteJob ¶
func (r *MXJobReconciler) DeleteJob(job interface{}) error
func (*MXJobReconciler) GetAPIGroupVersion ¶
func (r *MXJobReconciler) GetAPIGroupVersion() schema.GroupVersion
func (*MXJobReconciler) GetAPIGroupVersionKind ¶
func (r *MXJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
func (*MXJobReconciler) GetDefaultContainerName ¶
func (r *MXJobReconciler) GetDefaultContainerName() string
func (*MXJobReconciler) GetDefaultContainerPortName ¶
func (r *MXJobReconciler) GetDefaultContainerPortName() string
func (*MXJobReconciler) GetGroupNameLabelValue ¶
func (r *MXJobReconciler) GetGroupNameLabelValue() string
func (*MXJobReconciler) GetJobFromAPIClient ¶
func (r *MXJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
func (*MXJobReconciler) GetJobFromInformerCache ¶
func (r *MXJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
func (*MXJobReconciler) GetPodsForJob ¶
func (r *MXJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
func (*MXJobReconciler) GetServicesForJob ¶
func (r *MXJobReconciler) GetServicesForJob(job interface{}) ([]*corev1.Service, error)
func (*MXJobReconciler) IsMasterRole ¶
func (r *MXJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool
func (*MXJobReconciler) Reconcile ¶
+kubebuilder:rbac:groups=kubeflow.org,resources=mxjobs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=kubeflow.org,resources=mxjobs/status,verbs=get;update;patch +kubebuilder:rbac:groups=kubeflow.org,resources=mxjobs/finalizers,verbs=update +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;delete
func (*MXJobReconciler) SetClusterSpec ¶
func (r *MXJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
func (*MXJobReconciler) SetupWithManager ¶
func (r *MXJobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*MXJobReconciler) UpdateJobStatus ¶
func (r *MXJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, jobStatus *commonv1.JobStatus) error
func (*MXJobReconciler) UpdateJobStatusInApiServer ¶
func (r *MXJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
UpdateJobStatusInApiServer updates the status of the given MXJob.