Documentation
¶
Index ¶
- func SetPodEnv(obj interface{}, podTemplateSpec *corev1.PodTemplateSpec, rtype, index string) error
- type PyTorchJobReconciler
- func (r *PyTorchJobReconciler) ControllerName() string
- func (r *PyTorchJobReconciler) DeleteJob(job interface{}) 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) 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) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *PyTorchJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) bool
- func (r *PyTorchJobReconciler) Reconcile(ctx context.Context, 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[commonv1.ReplicaType]*commonv1.ReplicaSpec, ...) error
- func (r *PyTorchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PyTorchJobReconciler ¶
type PyTorchJobReconciler struct { common.JobController client.Client Scheme *runtime.Scheme Log logr.Logger // contains filtered or unexported fields }
PyTorchJobReconciler reconciles a PyTorchJob object
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, enableGangScheduling bool) *PyTorchJobReconciler
NewReconciler creates a PyTorchJob Reconciler
func (*PyTorchJobReconciler) ControllerName ¶
func (r *PyTorchJobReconciler) ControllerName() string
func (*PyTorchJobReconciler) DeleteJob ¶
func (r *PyTorchJobReconciler) DeleteJob(job interface{}) error
func (*PyTorchJobReconciler) GetAPIGroupVersion ¶
func (r *PyTorchJobReconciler) GetAPIGroupVersion() schema.GroupVersion
func (*PyTorchJobReconciler) GetAPIGroupVersionKind ¶
func (r *PyTorchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
func (*PyTorchJobReconciler) GetDefaultContainerName ¶
func (r *PyTorchJobReconciler) GetDefaultContainerName() string
func (*PyTorchJobReconciler) GetDefaultContainerPortName ¶
func (r *PyTorchJobReconciler) GetDefaultContainerPortName() string
func (*PyTorchJobReconciler) GetGroupNameLabelValue ¶
func (r *PyTorchJobReconciler) GetGroupNameLabelValue() string
func (*PyTorchJobReconciler) GetJobFromAPIClient ¶
func (r *PyTorchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
func (*PyTorchJobReconciler) GetJobFromInformerCache ¶
func (r *PyTorchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
func (*PyTorchJobReconciler) GetPodsForJob ¶
func (r *PyTorchJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
func (*PyTorchJobReconciler) GetServicesForJob ¶
func (r *PyTorchJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
func (*PyTorchJobReconciler) IsMasterRole ¶
func (r *PyTorchJobReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool
func (*PyTorchJobReconciler) Reconcile ¶
func (r *PyTorchJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. the PyTorchJob object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile
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
SetupWithManager sets up the controller with the Manager.
func (*PyTorchJobReconciler) UpdateJobStatus ¶
func (r *PyTorchJobReconciler) UpdateJobStatus(job interface{}, replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, jobStatus *commonv1.JobStatus) error
UpdateJobStatus updates the job status and job conditions
func (*PyTorchJobReconciler) UpdateJobStatusInApiServer ¶
func (r *PyTorchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *commonv1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in to cluster.