Documentation ¶
Index ¶
- Constants
- func ContainsMasterSpec(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec) bool
- type EnvVarGenerator
- type PaddleJobReconciler
- func (r *PaddleJobReconciler) ControllerName() string
- func (r *PaddleJobReconciler) DeleteJob(job interface{}) error
- func (jc *PaddleJobReconciler) GenLabelSelector(jobName string, rtype kubeflowv1.ReplicaType) *metav1.LabelSelector
- func (r *PaddleJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *PaddleJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *PaddleJobReconciler) GetDefaultContainerName() string
- func (r *PaddleJobReconciler) GetDefaultContainerPortName() string
- func (r *PaddleJobReconciler) GetFrameworkName() string
- func (r *PaddleJobReconciler) GetGroupNameLabelValue() string
- func (r *PaddleJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *PaddleJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *PaddleJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *PaddleJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *PaddleJobReconciler) IsMasterRole(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, ...) bool
- func (r *PaddleJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *PaddleJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
- func (r *PaddleJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThreads int) error
- func (r *PaddleJobReconciler) UpdateJobStatus(job interface{}, replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, ...) error
- func (r *PaddleJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *kubeflowv1.JobStatus) error
Constants ¶
const ( EnvMasterEndpoint = "PADDLE_MASTER" EnvNumNodes = "PADDLE_NNODES" EnvJobID = "PADDLE_JOB_ID" EnvServerNum = "PADDLE_SERVER_NUM" EnvTrainerNum = "PADDLE_TRAINER_NUM" )
Variables ¶
This section is empty.
Functions ¶
func ContainsMasterSpec ¶
func ContainsMasterSpec(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec) bool
ContainsMasterSpec returns true if the paddlejob contains master spec.
Types ¶
type EnvVarGenerator ¶
type EnvVarGenerator interface {
Generate(job *kubeflowv1.PaddleJob) ([]corev1.EnvVar, error)
}
EnvVarGenerator is the environment variable generator interface.
type PaddleJobReconciler ¶
type PaddleJobReconciler struct { common.JobController client.Client Scheme *runtime.Scheme Log logr.Logger // contains filtered or unexported fields }
PaddleJobReconciler reconciles a PaddleJob object
func NewReconciler ¶
func NewReconciler(mgr manager.Manager, gangSchedulingSetupFunc common.GangSchedulingSetupFunc) *PaddleJobReconciler
NewReconciler creates a PaddleJob Reconciler
func (*PaddleJobReconciler) ControllerName ¶
func (r *PaddleJobReconciler) ControllerName() string
func (*PaddleJobReconciler) DeleteJob ¶
func (r *PaddleJobReconciler) DeleteJob(job interface{}) error
func (*PaddleJobReconciler) GenLabelSelector ¶
func (jc *PaddleJobReconciler) GenLabelSelector(jobName string, rtype kubeflowv1.ReplicaType) *metav1.LabelSelector
func (*PaddleJobReconciler) GetAPIGroupVersion ¶
func (r *PaddleJobReconciler) GetAPIGroupVersion() schema.GroupVersion
func (*PaddleJobReconciler) GetAPIGroupVersionKind ¶
func (r *PaddleJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
func (*PaddleJobReconciler) GetDefaultContainerName ¶
func (r *PaddleJobReconciler) GetDefaultContainerName() string
func (*PaddleJobReconciler) GetDefaultContainerPortName ¶
func (r *PaddleJobReconciler) GetDefaultContainerPortName() string
func (*PaddleJobReconciler) GetFrameworkName ¶ added in v1.7.0
func (r *PaddleJobReconciler) GetFrameworkName() string
func (*PaddleJobReconciler) GetGroupNameLabelValue ¶
func (r *PaddleJobReconciler) GetGroupNameLabelValue() string
func (*PaddleJobReconciler) GetJobFromAPIClient ¶
func (r *PaddleJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
func (*PaddleJobReconciler) GetJobFromInformerCache ¶
func (r *PaddleJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
func (*PaddleJobReconciler) GetPodsForJob ¶
func (r *PaddleJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
func (*PaddleJobReconciler) GetServicesForJob ¶
func (r *PaddleJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
func (*PaddleJobReconciler) IsMasterRole ¶
func (r *PaddleJobReconciler) IsMasterRole(replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, rtype kubeflowv1.ReplicaType, index int) bool
func (*PaddleJobReconciler) Reconcile ¶
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 PaddleJob 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 (*PaddleJobReconciler) SetClusterSpec ¶
func (r *PaddleJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error
SetClusterSpec sets the cluster spec and init container for the pod
func (*PaddleJobReconciler) SetupWithManager ¶
func (r *PaddleJobReconciler) SetupWithManager(mgr ctrl.Manager, controllerThreads int) error
SetupWithManager sets up the controller with the Manager.
func (*PaddleJobReconciler) UpdateJobStatus ¶
func (r *PaddleJobReconciler) UpdateJobStatus(job interface{}, replicas map[kubeflowv1.ReplicaType]*kubeflowv1.ReplicaSpec, jobStatus *kubeflowv1.JobStatus) error
UpdateJobStatus updates the job status and job conditions
func (*PaddleJobReconciler) UpdateJobStatusInApiServer ¶
func (r *PaddleJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *kubeflowv1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in to cluster.