jobs

package
v0.7.16 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobSpec added in v0.6.4

func NewJobSpec(id, namespace, image, jsn string) *batchv1.Job

Types

type JobClient

type JobClient struct {
	ClientSet  *kubernetes.Clientset
	Repository result.Repository
	Namespace  string
	Cmd        string
	Log        *zap.SugaredLogger
}

func NewJobClient

func NewJobClient() (*JobClient, error)

func (*JobClient) AbortK8sJob

func (c *JobClient) AbortK8sJob(jobName string) *testkube.ExecutionResult

func (*JobClient) CreatePersistentVolume

func (c *JobClient) CreatePersistentVolume(name string) error

func (*JobClient) CreatePersistentVolumeClaim

func (c *JobClient) CreatePersistentVolumeClaim(name string) error

func (*JobClient) GetJobPods added in v0.6.4

func (c *JobClient) GetJobPods(podsClient pods.PodInterface, jobName string, retryNr, retryCount int) (*v1.PodList, error)

func (*JobClient) GetPodLogs

func (c *JobClient) GetPodLogs(podName string) (logs []byte, err error)

func (*JobClient) LaunchK8sJob

func (c *JobClient) LaunchK8sJob(image string, repo result.Repository, execution testkube.Execution) (result testkube.ExecutionResult, err error)

LaunchK8sJob launches new job and run executor of given type TODO consider moving storage based operation up in hierarchy TODO Consider moving launch of K8s job as always sync

func (*JobClient) LaunchK8sJobSync added in v0.7.6

func (c *JobClient) LaunchK8sJobSync(image string, repo result.Repository, execution testkube.Execution) (result testkube.ExecutionResult, err error)

LaunchK8sJob launches new job and run executor of given type TODO Consider moving launch of K8s job as always sync TODO Consider moving storage calls level up (remove dependency from here)

func (*JobClient) TailJobLogs added in v0.6.4

func (c *JobClient) TailJobLogs(id string, logs chan []byte) (err error)

TailJobLogs - locates logs for job pod(s)

func (*JobClient) TailPodLogs added in v0.6.4

func (c *JobClient) TailPodLogs(ctx context.Context, podName string, logs chan []byte) (err error)

Jump to

Keyboard shortcuts

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