elasticdl

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainMasterSpec

func ContainMasterSpec(job *v1alpha1.ElasticDLJob) bool

Types

type ElasticDLJobReconciler

type ElasticDLJobReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ElasticDLJobReconciler reconcile a ElastiDLJob object

func (*ElasticDLJobReconciler) ControllerName

func (r *ElasticDLJobReconciler) ControllerName() string

func (*ElasticDLJobReconciler) CreatePod

func (r *ElasticDLJobReconciler) CreatePod(job interface{}, pod *corev1.Pod) error

CreatePod creates the pod

func (*ElasticDLJobReconciler) CreateService

func (r *ElasticDLJobReconciler) CreateService(job interface{}, service *corev1.Service) error

CreateService creates the service

func (*ElasticDLJobReconciler) DeleteJob

func (r *ElasticDLJobReconciler) DeleteJob(job interface{}) error

DeleteJob deletes the job

func (*ElasticDLJobReconciler) DeletePod

func (r *ElasticDLJobReconciler) DeletePod(job interface{}, pod *corev1.Pod) error

DeletePod deletes the pod

func (*ElasticDLJobReconciler) DeleteService

func (r *ElasticDLJobReconciler) DeleteService(job interface{}, name string, namespace string) error

DeleteService deletes the service

func (*ElasticDLJobReconciler) GetAPIGroupVersion

func (r *ElasticDLJobReconciler) GetAPIGroupVersion() schema.GroupVersion

GetAPIGroupVersion returns the GroupVersion of the API

func (*ElasticDLJobReconciler) GetAPIGroupVersionKind

func (r *ElasticDLJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind

GetAPIGroupVersionKind returns the GroupVersionKind of the API

func (*ElasticDLJobReconciler) GetDefaultContainerName

func (r *ElasticDLJobReconciler) GetDefaultContainerName() string

GetDefaultContainerName returns the default container name in pod

func (*ElasticDLJobReconciler) GetDefaultContainerPortName

func (r *ElasticDLJobReconciler) GetDefaultContainerPortName() string

GetDefaultContainerPortName Get the default container port name

func (*ElasticDLJobReconciler) GetDefaultContainerPortNumber

func (r *ElasticDLJobReconciler) GetDefaultContainerPortNumber() int32

GetDefaultContainerPortNumber get the default container port number

func (*ElasticDLJobReconciler) GetGroupNameLabelValue

func (r *ElasticDLJobReconciler) GetGroupNameLabelValue() string

GetGroupNameLabelValue returns the Group Name(value) in the labels of the job

func (*ElasticDLJobReconciler) GetJobFromAPIClient

func (r *ElasticDLJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)

GetJobFromAPIClient returns the Job from API server

func (*ElasticDLJobReconciler) GetJobFromInformerCache

func (r *ElasticDLJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)

GetJobFromInformerCache returns the Job from Informer Cache

func (*ElasticDLJobReconciler) GetPodsForJob

func (r *ElasticDLJobReconciler) 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 (*ElasticDLJobReconciler) GetReconcileOrders

func (r *ElasticDLJobReconciler) GetReconcileOrders() []v1.ReplicaType

func (*ElasticDLJobReconciler) GetServicesForJob

func (r *ElasticDLJobReconciler) 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 (*ElasticDLJobReconciler) IsMasterRole

func (r *ElasticDLJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool

func (*ElasticDLJobReconciler) Reconcile

func (r *ElasticDLJobReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*ElasticDLJobReconciler) SetClusterSpec

func (r *ElasticDLJobReconciler) SetClusterSpec(job interface{}, podTemplate *corev1.PodTemplateSpec, rtype, index string) error

SetClusterSpec sets the cluster spec for the pod

func (*ElasticDLJobReconciler) SetupWithManager

func (r *ElasticDLJobReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*ElasticDLJobReconciler) UpdateJobStatus

func (r *ElasticDLJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error

UpdateJobStatus updates the job status and job conditions

func (*ElasticDLJobReconciler) UpdateJobStatusInApiServer

func (r *ElasticDLJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error

UpdateJobStatusInApiServer updates the job status in API server

Jump to

Keyboard shortcuts

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