Documentation ¶
Index ¶
- Constants
- func NewEasydlMasterServiceName(jobName string) string
- func NewMasterTemplateToJob(job *elasticv1alpha1.ElasticJob, masterImage string)
- func SetMasterAddrIntoContainer(container *corev1.Container, jobName string)
- type Manager
- func (m *Manager) HandleFaultPods(client runtime_client.Client, job *elasticv1alpha1.ElasticJob) error
- func (m *Manager) ReconcilePods(client runtime_client.Client, job *elasticv1alpha1.ElasticJob, ...) error
- func (m *Manager) StopRunningPods(client runtime_client.Client, job *elasticv1alpha1.ElasticJob) error
- func (m *Manager) SyncJobState(client runtime_client.Client, job *elasticv1alpha1.ElasticJob) error
Constants ¶
View Source
const ( // ReplicaTypeJobMaster is the type for DLRover ElasticJob Master replica. ReplicaTypeJobMaster commonv1.ReplicaType = "dlrover-master" )
Variables ¶
This section is empty.
Functions ¶
func NewEasydlMasterServiceName ¶
NewEasydlMasterServiceName create a service name for Job master
func NewMasterTemplateToJob ¶
func NewMasterTemplateToJob(job *elasticv1alpha1.ElasticJob, masterImage string)
NewMasterTemplateToJob sets configurations to the master template of a job.
func SetMasterAddrIntoContainer ¶
SetMasterAddrIntoContainer sets the master service address into pod envs
Types ¶
type Manager ¶
type Manager struct{}
Manager generates a master pod object.
func (*Manager) HandleFaultPods ¶
func (m *Manager) HandleFaultPods(client runtime_client.Client, job *elasticv1alpha1.ElasticJob) error
HandleFaultPods relaunches a new Pod if a pod is deleted or ignores the fault Pod if it fails with uncoverable errors.
func (*Manager) ReconcilePods ¶
func (m *Manager) ReconcilePods( client runtime_client.Client, job *elasticv1alpha1.ElasticJob, scalePlan *elasticv1alpha1.ScalePlan, ) error
ReconcilePods reconciles Pods of a job on a K8s cluster
func (*Manager) StopRunningPods ¶
func (m *Manager) StopRunningPods( client runtime_client.Client, job *elasticv1alpha1.ElasticJob, ) error
StopRunningPods stops all running master Pods
func (*Manager) SyncJobState ¶
func (m *Manager) SyncJobState(client runtime_client.Client, job *elasticv1alpha1.ElasticJob) error
SyncJobState synchronize the job status by replicas
Click to show internal directories.
Click to hide internal directories.