job

package
v1.0.8-5 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	*v1.Job

	Timeouts *Timeouts
}

func New

func New(job *v1.Job, timeouts *Timeouts) *Job

func NewWithDefaults

func NewWithDefaults(job *v1.Job) *Job

func NewWithDefaultsUseExistingName

func NewWithDefaultsUseExistingName(job *v1.Job) *Job

func (*Job) AddContainer

func (j *Job) AddContainer(add container.Container)

func (*Job) AddInitContainer

func (j *Job) AddInitContainer(add container.Container)

func (*Job) AppendPullSecret

func (j *Job) AppendPullSecret(imagePullSecret corev1.LocalObjectReference)

func (*Job) AppendVolumeIfMissing

func (j *Job) AppendVolumeIfMissing(volume corev1.Volume)

func (*Job) ContainerFinished

func (j *Job) ContainerFinished(client controller.Client, contName string) (bool, error)

func (*Job) ContainerStatus

func (j *Job) ContainerStatus(client controller.Client, contName string) (Status, error)

func (*Job) Delete

func (j *Job) Delete(client controller.Client) error

func (*Job) GetContainer

func (j *Job) GetContainer(name string) (cont container.Container, err error)

func (*Job) MustGetContainer

func (j *Job) MustGetContainer(name string) container.Container

func (*Job) Status

func (j *Job) Status(client controller.Client) (Status, error)

func (*Job) UpdateSecurityContextForAllContainers

func (j *Job) UpdateSecurityContextForAllContainers(sc container.SecurityContext)

UpdateSecurityContextForAllContainers updates the security context for all containers defined in the job

func (*Job) WaitUntilActive

func (j *Job) WaitUntilActive(client controller.Client) error

func (*Job) WaitUntilContainerFinished

func (j *Job) WaitUntilContainerFinished(client controller.Client, contName string) error

func (*Job) WaitUntilFinished

func (j *Job) WaitUntilFinished(client controller.Client) error

type Status

type Status string
const (
	FAILED    Status = "failed"
	COMPLETED Status = "completed"
	UNKNOWN   Status = "unknown"
)

type Timeouts

type Timeouts struct {
	WaitUntilActive, WaitUntilFinished time.Duration
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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