xgboostjob

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetPodEnv

func SetPodEnv(job interface{}, podTemplate *corev1.PodTemplateSpec, index string) error

Set the pod env set for XGBoost Rabit Tracker and worker

Types

type XgboostJobReconciler

type XgboostJobReconciler struct {
	client.Client

	utilruntime.EmptyScaleImpl
	// contains filtered or unexported fields
}

XgboostJobReconciler reconciles a XGBoostJob object

func NewReconciler

NewReconciler returns a new reconcile.Reconciler

func (*XgboostJobReconciler) ControllerName

func (r *XgboostJobReconciler) ControllerName() string

func (*XgboostJobReconciler) DeleteJob

func (r *XgboostJobReconciler) DeleteJob(job interface{}) error

DeleteJob deletes the job

func (*XgboostJobReconciler) GetAPIGroupVersion

func (r *XgboostJobReconciler) GetAPIGroupVersion() schema.GroupVersion

func (*XgboostJobReconciler) GetAPIGroupVersionKind

func (r *XgboostJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind

func (*XgboostJobReconciler) GetDefaultContainerName

func (r *XgboostJobReconciler) GetDefaultContainerName() string

func (*XgboostJobReconciler) GetDefaultContainerPortName

func (r *XgboostJobReconciler) GetDefaultContainerPortName() string

func (*XgboostJobReconciler) GetDefaultContainerPortNumber

func (r *XgboostJobReconciler) GetDefaultContainerPortNumber() int32

func (*XgboostJobReconciler) GetGroupNameLabelValue

func (r *XgboostJobReconciler) GetGroupNameLabelValue() string

func (*XgboostJobReconciler) GetJobFromAPIClient

func (r *XgboostJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)

GetJobFromAPIClient returns the Job from API server

func (*XgboostJobReconciler) GetJobFromInformerCache

func (r *XgboostJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)

GetJobFromInformerCache returns the Job from Informer Cache

func (*XgboostJobReconciler) GetNodeForModelOutput added in v0.4.0

func (r *XgboostJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)

func (*XgboostJobReconciler) GetPodsForJob

func (r *XgboostJobReconciler) 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 (*XgboostJobReconciler) GetReconcileOrders

func (r *XgboostJobReconciler) GetReconcileOrders() []v1.ReplicaType

func (*XgboostJobReconciler) GetServicesForJob

func (r *XgboostJobReconciler) 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 (*XgboostJobReconciler) IsMasterRole

func (r *XgboostJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec,
	rtype v1.ReplicaType, index int) bool

func (*XgboostJobReconciler) Reconcile

func (*XgboostJobReconciler) SetClusterSpec

func (r *XgboostJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error

SetClusterSpec sets the cluster spec for the pod

func (*XgboostJobReconciler) SetupWithManager

func (r *XgboostJobReconciler) 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 (*XgboostJobReconciler) UpdateJobStatus

func (r *XgboostJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error

UpdateJobStatus updates the job status and job conditions

func (*XgboostJobReconciler) UpdateJobStatusInApiServer

func (r *XgboostJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error

UpdateJobStatusInApiServer updates the job status in to cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL