Documentation ¶
Index ¶
- func ContainMasterSpec(job *v1.PyTorchJob) bool
- type PytorchJobReconciler
- func (r *PytorchJobReconciler) ControllerName() string
- func (r *PytorchJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) error
- func (r *PytorchJobReconciler) CreateService(job interface{}, service *corev1.Service) error
- func (r *PytorchJobReconciler) DeleteJob(job interface{}) error
- func (r *PytorchJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error
- func (r *PytorchJobReconciler) DeleteService(job interface{}, name string, namespace string) error
- func (r *PytorchJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *PytorchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *PytorchJobReconciler) GetDefaultContainerName() string
- func (r *PytorchJobReconciler) GetDefaultContainerPortName() string
- func (r *PytorchJobReconciler) GetDefaultContainerPortNumber() int32
- func (r *PytorchJobReconciler) GetGroupNameLabelValue() string
- func (r *PytorchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *PytorchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *PytorchJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *PytorchJobReconciler) GetReconcileOrders() []v1.ReplicaType
- func (r *PytorchJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *PytorchJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
- func (r *PytorchJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)
- func (r *PytorchJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- func (r *PytorchJobReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *PytorchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, ...) error
- func (r *PytorchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainMasterSpec ¶
func ContainMasterSpec(job *v1.PyTorchJob) bool
Types ¶
type PytorchJobReconciler ¶
PytorchJobReconciler reconcile a PytorchJob object
func NewReconciler ¶
func NewReconciler(mgr ctrl.Manager, config job_controller.JobControllerConfiguration) *PytorchJobReconciler
func (*PytorchJobReconciler) ControllerName ¶
func (r *PytorchJobReconciler) ControllerName() string
func (*PytorchJobReconciler) CreatePod ¶
func (r *PytorchJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) error
CreatePod creates the pod
func (*PytorchJobReconciler) CreateService ¶
func (r *PytorchJobReconciler) CreateService(job interface{}, service *corev1.Service) error
CreateService creates the service
func (*PytorchJobReconciler) DeleteJob ¶
func (r *PytorchJobReconciler) DeleteJob(job interface{}) error
DeleteJob deletes the job
func (*PytorchJobReconciler) DeletePod ¶
func (r *PytorchJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error
DeletePod deletes the pod
func (*PytorchJobReconciler) DeleteService ¶
func (r *PytorchJobReconciler) DeleteService(job interface{}, name string, namespace string) error
DeleteService deletes the service
func (*PytorchJobReconciler) GetAPIGroupVersion ¶
func (r *PytorchJobReconciler) GetAPIGroupVersion() schema.GroupVersion
GetAPIGroupVersion returns the GroupVersion of the API
func (*PytorchJobReconciler) GetAPIGroupVersionKind ¶
func (r *PytorchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
GetAPIGroupVersionKind returns the GroupVersionKind of the API
func (*PytorchJobReconciler) GetDefaultContainerName ¶
func (r *PytorchJobReconciler) GetDefaultContainerName() string
GetDefaultContainerName returns the default container name in pod
func (*PytorchJobReconciler) GetDefaultContainerPortName ¶
func (r *PytorchJobReconciler) GetDefaultContainerPortName() string
GetDefaultContainerPortName Get the default container port name
func (*PytorchJobReconciler) GetDefaultContainerPortNumber ¶
func (r *PytorchJobReconciler) GetDefaultContainerPortNumber() int32
GetDefaultContainerPortNumber get the default container port number
func (*PytorchJobReconciler) GetGroupNameLabelValue ¶
func (r *PytorchJobReconciler) GetGroupNameLabelValue() string
GetGroupNameLabelValue returns the Group Name(value) in the labels of the job
func (*PytorchJobReconciler) GetJobFromAPIClient ¶
func (r *PytorchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
GetJobFromAPIClient returns the Job from API server
func (*PytorchJobReconciler) GetJobFromInformerCache ¶
func (r *PytorchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
GetJobFromInformerCache returns the Job from Informer Cache
func (*PytorchJobReconciler) GetPodsForJob ¶
func (r *PytorchJobReconciler) 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 (*PytorchJobReconciler) GetReconcileOrders ¶
func (r *PytorchJobReconciler) GetReconcileOrders() []v1.ReplicaType
func (*PytorchJobReconciler) GetServicesForJob ¶
func (r *PytorchJobReconciler) 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 (*PytorchJobReconciler) IsMasterRole ¶
func (r *PytorchJobReconciler) 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 (*PytorchJobReconciler) SetClusterSpec ¶
func (r *PytorchJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
SetClusterSpec sets the cluster spec for the pod
func (*PytorchJobReconciler) SetupWithManager ¶
func (r *PytorchJobReconciler) SetupWithManager(mgr ctrl.Manager) error
func (*PytorchJobReconciler) UpdateJobStatus ¶
func (r *PytorchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error
UpdateJobStatus updates the job status and job conditions
func (*PytorchJobReconciler) UpdateJobStatusInApiServer ¶
func (r *PytorchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in API server