master

package
v0.0.0-...-2955ef2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0, BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

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

func NewEasydlMasterServiceName(jobName string) string

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

func SetMasterAddrIntoContainer(container *corev1.Container, jobName string)

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

Jump to

Keyboard shortcuts

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