v1

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeSingleJobName

func ComposeSingleJobName(batchName, batchJobName string) string

ComposeSingleJobName from RadixBatchJob

func GetJobStatusFromRadixBatchJobsStatus

func GetJobStatusFromRadixBatchJobsStatus(batchName, jobName string, jobStatus modelsv2.RadixBatchJobStatus) modelsv1.JobStatus

GetJobStatusFromRadixBatchJobsStatus Get Job status from RadixBatchJob

func GetLabelSelectorForBatches

func GetLabelSelectorForBatches(componentName string) string

GetLabelSelectorForBatches Gets a label selector for a batch scheduler job

func GetPodsToJobNameMap

func GetPodsToJobNameMap(pods []corev1.Pod) map[string][]corev1.Pod

GetPodsToJobNameMap Gets a map of pods to K8sJobNameLabel label as keys

func ParseBatchAndJobNameFromScheduledJobName

func ParseBatchAndJobNameFromScheduledJobName(scheduleJobName string) (batchName, batchJobName string, ok bool)

ParseBatchAndJobNameFromScheduledJobName Decompose V2 batch name and jobs name from V1 job-name

Types

type Handler

type Handler struct {
	Kube         *kube.Kube
	Env          *models.Env
	KubeClient   kubernetes.Interface
	RadixClient  versioned.Interface
	HandlerApiV2 apiv2.Handler
}

func (*Handler) CreateJob

func (handler *Handler) CreateJob(namespace string, job *batchv1.Job) (*batchv1.Job, error)

CreateJob Create a job

func (*Handler) DeleteSecret

func (handler *Handler) DeleteSecret(secret *corev1.Secret) error

DeleteSecret Delete the service for the job

func (*Handler) DeleteService

func (handler *Handler) DeleteService(service *corev1.Service) error

DeleteService Deletes a service

func (*Handler) GetBatch

func (handler *Handler) GetBatch(batchName string) (*batchv1.Job, error)

GetBatch Gets a job, running a batch

func (*Handler) GetPodsForLabelSelector

func (handler *Handler) GetPodsForLabelSelector(labelSelector string) ([]corev1.Pod, error)

func (*Handler) GetSecretsForJob

func (handler *Handler) GetSecretsForJob(jobName string) (*corev1.SecretList, error)

GetSecretsForJob Get secrets for the job

func (*Handler) GetServiceForJob

func (handler *Handler) GetServiceForJob(jobName string) (*corev1.ServiceList, error)

GetServiceForJob Get the service for the job

Directories

Path Synopsis
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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