Documentation
¶
Overview ¶
Package controller provides a Kubernetes controller for a ElasticBatchJob resource.
Index ¶
- func OnOwnerDeleteAndDeletionExpectationFunc(jc job_controller.JobController) func(e event.DeleteEvent) bool
- type ElasticBatchConfig
- type ElasticBatchJobReconciler
- func (r *ElasticBatchJobReconciler) ControllerName() string
- func (r *ElasticBatchJobReconciler) DeleteJob(job interface{}) error
- func (r *ElasticBatchJobReconciler) GetAPIGroupVersion() schema.GroupVersion
- func (r *ElasticBatchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
- func (r *ElasticBatchJobReconciler) GetDefaultContainerName() string
- func (r *ElasticBatchJobReconciler) GetDefaultContainerPortName() string
- func (r *ElasticBatchJobReconciler) GetDefaultContainerPortNumber() int32
- func (r *ElasticBatchJobReconciler) GetGroupNameLabelValue() string
- func (r *ElasticBatchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
- func (r *ElasticBatchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
- func (r *ElasticBatchJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
- func (r *ElasticBatchJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
- func (r *ElasticBatchJobReconciler) GetReconcileOrders() []v1.ReplicaType
- func (r *ElasticBatchJobReconciler) GetServicesForJob(obj interface{}) ([]*corev1.Service, error)
- func (r *ElasticBatchJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
- func (r *ElasticBatchJobReconciler) Reconcile(_ context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ElasticBatchJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, ...) error
- func (r *ElasticBatchJobReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *ElasticBatchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, ...) error
- func (r *ElasticBatchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
- type TaskSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnOwnerDeleteAndDeletionExpectationFunc ¶
func OnOwnerDeleteAndDeletionExpectationFunc(jc job_controller.JobController) func(e event.DeleteEvent) bool
Types ¶
type ElasticBatchConfig ¶
type ElasticBatchJobReconciler ¶
type ElasticBatchJobReconciler struct { client.Client utilruntime.EmptyScaleImpl // contains filtered or unexported fields }
ElasticBatchJobReconciler reconciles a ElasticBatchJob object
func NewReconciler ¶
func NewReconciler(mgr ctrl.Manager, config options.JobControllerConfiguration) *ElasticBatchJobReconciler
func (*ElasticBatchJobReconciler) ControllerName ¶
func (r *ElasticBatchJobReconciler) ControllerName() string
ControllerName returns the Controller name
func (*ElasticBatchJobReconciler) DeleteJob ¶
func (r *ElasticBatchJobReconciler) DeleteJob(job interface{}) error
DeleteJob deletes the job
func (*ElasticBatchJobReconciler) GetAPIGroupVersion ¶
func (r *ElasticBatchJobReconciler) GetAPIGroupVersion() schema.GroupVersion
GetAPIGroupVersion returns the GroupVersion of the API
func (*ElasticBatchJobReconciler) GetAPIGroupVersionKind ¶
func (r *ElasticBatchJobReconciler) GetAPIGroupVersionKind() schema.GroupVersionKind
GetAPIGroupVersionKind returns the GroupVersionKind of the API
func (*ElasticBatchJobReconciler) GetDefaultContainerName ¶
func (r *ElasticBatchJobReconciler) GetDefaultContainerName() string
GetDefaultContainerName returns the default container name in pod
func (*ElasticBatchJobReconciler) GetDefaultContainerPortName ¶
func (r *ElasticBatchJobReconciler) GetDefaultContainerPortName() string
GetDefaultContainerPortName Get the default container port name
func (*ElasticBatchJobReconciler) GetDefaultContainerPortNumber ¶
func (r *ElasticBatchJobReconciler) GetDefaultContainerPortNumber() int32
GetDefaultContainerPortNumber get the default container port number
func (*ElasticBatchJobReconciler) GetGroupNameLabelValue ¶
func (r *ElasticBatchJobReconciler) GetGroupNameLabelValue() string
GetGroupNameLabelValue returns the Group Name(value) in the labels of the job
func (*ElasticBatchJobReconciler) GetJobFromAPIClient ¶
func (r *ElasticBatchJobReconciler) GetJobFromAPIClient(namespace, name string) (metav1.Object, error)
GetJobFromAPIClient returns the Job from API server
func (*ElasticBatchJobReconciler) GetJobFromInformerCache ¶
func (r *ElasticBatchJobReconciler) GetJobFromInformerCache(namespace, name string) (metav1.Object, error)
GetJobFromInformerCache returns the Job from Informer Cache
func (*ElasticBatchJobReconciler) GetNodeForModelOutput ¶
func (r *ElasticBatchJobReconciler) GetNodeForModelOutput(pods []*corev1.Pod) (nodeName string)
func (*ElasticBatchJobReconciler) GetPodsForJob ¶
func (r *ElasticBatchJobReconciler) GetPodsForJob(obj interface{}) ([]*corev1.Pod, error)
GetPodsForJob returns the set of pods that this job should manage.
func (*ElasticBatchJobReconciler) GetReconcileOrders ¶
func (r *ElasticBatchJobReconciler) GetReconcileOrders() []v1.ReplicaType
Get replicas reconcile orders so that replica type with higher priority can be created earlier.
func (*ElasticBatchJobReconciler) GetServicesForJob ¶
func (r *ElasticBatchJobReconciler) 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 (*ElasticBatchJobReconciler) IsMasterRole ¶
func (r *ElasticBatchJobReconciler) IsMasterRole(replicas map[v1.ReplicaType]*v1.ReplicaSpec, rtype v1.ReplicaType, index int) bool
IsMasterRole returns if this replica type with index specified is a master role. MasterRole pod will have "job-role=master" set in its label
func (*ElasticBatchJobReconciler) SetClusterSpec ¶
func (r *ElasticBatchJobReconciler) SetClusterSpec(ctx context.Context, job interface{}, podTemplateSpec *corev1.PodTemplateSpec, rt, index string) error
SetClusterSpec generates and sets ElASTICBATCH_CONFIG for the given podTemplateSpec.
func (*ElasticBatchJobReconciler) SetupWithManager ¶
func (r *ElasticBatchJobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*ElasticBatchJobReconciler) UpdateJobStatus ¶
func (r *ElasticBatchJobReconciler) UpdateJobStatus(job interface{}, replicas map[v1.ReplicaType]*v1.ReplicaSpec, jobStatus *v1.JobStatus, restart bool) error
UpdateJobStatus updates the job status and job conditions
func (*ElasticBatchJobReconciler) UpdateJobStatusInApiServer ¶
func (r *ElasticBatchJobReconciler) UpdateJobStatusInApiServer(job interface{}, jobStatus *v1.JobStatus) error
UpdateJobStatusInApiServer updates the job status in API server