Documentation ¶
Index ¶
- func ContainMasterSpec(job *v1alpha1.ElasticDLJob) bool
- type ElasticDLJobReconciler
- func (r *ElasticDLJobReconciler) ControllerName() string
- func (r *ElasticDLJobReconciler) DeleteJob(job interface{}) error
- func (r *ElasticDLJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *ElasticDLJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *ElasticDLJobReconciler) GetDefaultContainerName() string
- func (r *ElasticDLJobReconciler) GetDefaultContainerPortName() string
- func (r *ElasticDLJobReconciler) GetDefaultContainerPortNumber() int32
- func (r *ElasticDLJobReconciler) GetGroupNameLabelValue() string
- func (r *ElasticDLJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *ElasticDLJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *ElasticDLJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
- func (r *ElasticDLJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *ElasticDLJobReconciler) GetReconcileOrders() []v1.ReplicaType
- func (r *ElasticDLJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *ElasticDLJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
- func (r *ElasticDLJobReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ElasticDLJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, ...) error
- func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ElasticDLJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, ...) error
- func (r *ElasticDLJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainMasterSpec ¶
func ContainMasterSpec(job *v1alpha1.ElasticDLJob) bool
Types ¶
type ElasticDLJobReconciler ¶
type ElasticDLJobReconciler struct { client.Client utilruntime.EmptyScaleImpl // contains filtered or unexported fields }
ElasticDLJobReconciler reconcile a ElastiDLJob object
func NewReconciler ¶
func NewReconciler(mgr ctrl.Manager, config options.JobControllerConfiguration) *ElasticDLJobReconciler
func (*ElasticDLJobReconciler) ControllerName ¶
func (r *ElasticDLJobReconciler) ControllerName() string
func (*ElasticDLJobReconciler) DeleteJob ¶
func (r *ElasticDLJobReconciler) DeleteJob(job interface{}) error
DeleteJob deletes the job
func (*ElasticDLJobReconciler) GetAPIGroupVersion ¶
func (r *ElasticDLJobReconciler) GetAPIGroupVersion() schema.GroupVersion
GetAPIGroupVersion returns the GroupVersion of the API
func (*ElasticDLJobReconciler) GetAPIGroupVersionKind ¶
func (r *ElasticDLJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
GetAPIGroupVersionKind returns the GroupVersionKind of the API
func (*ElasticDLJobReconciler) GetDefaultContainerName ¶
func (r *ElasticDLJobReconciler) GetDefaultContainerName() string
GetDefaultContainerName returns the default container name in pod
func (*ElasticDLJobReconciler) GetDefaultContainerPortName ¶
func (r *ElasticDLJobReconciler) GetDefaultContainerPortName() string
GetDefaultContainerPortName Get the default container port name
func (*ElasticDLJobReconciler) GetDefaultContainerPortNumber ¶
func (r *ElasticDLJobReconciler) GetDefaultContainerPortNumber() int32
GetDefaultContainerPortNumber get the default container port number
func (*ElasticDLJobReconciler) GetGroupNameLabelValue ¶
func (r *ElasticDLJobReconciler) GetGroupNameLabelValue() string
GetGroupNameLabelValue returns the Group Name(value) in the labels of the job
func (*ElasticDLJobReconciler) GetJobFromAPIClient ¶
func (r *ElasticDLJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
GetJobFromAPIClient returns the Job from API server
func (*ElasticDLJobReconciler) GetJobFromInformerCache ¶
func (r *ElasticDLJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
GetJobFromInformerCache returns the Job from Informer Cache
func (*ElasticDLJobReconciler) GetNodeForModelOutput ¶ added in v0.4.0
func (r *ElasticDLJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
func (*ElasticDLJobReconciler) GetPodsForJob ¶
func (r *ElasticDLJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
GetPodsForJob returns the pods managed by the job. This can be achieved by selecting pods using label key "job-name" i.e. all pods created by the job will come with label "job-name" = <this_job_name>
func (*ElasticDLJobReconciler) GetReconcileOrders ¶
func (r *ElasticDLJobReconciler) GetReconcileOrders() []v1.ReplicaType
func (*ElasticDLJobReconciler) GetServicesForJob ¶
func (r *ElasticDLJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
GetServicesForJob returns the services managed by the job. This can be achieved by selecting services using label key "job-name" i.e. all services created by the job will come with label "job-name" = <this_job_name>
func (*ElasticDLJobReconciler) IsMasterRole ¶
func (r *ElasticDLJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
func (*ElasticDLJobReconciler) SetClusterSpec ¶
func (r *ElasticDLJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
SetClusterSpec sets the cluster spec for the pod
func (*ElasticDLJobReconciler) SetupWithManager ¶
func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error
func (*ElasticDLJobReconciler) UpdateJobStatus ¶
func (r *ElasticDLJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error
UpdateJobStatus updates the job status and job conditions
func (*ElasticDLJobReconciler) UpdateJobStatusInApiServer ¶
func (r *ElasticDLJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in API server