package job

import "k8s.io/kubernetes/pkg/controller/job"

Package job contains logic for watching and synchronizing jobs.

Index

Variables

var (
	// DefaultJobBackOff is the default backoff period, exported for the e2e test
	DefaultJobBackOff = 10 * time.Second
	// MaxJobBackOff is the max backoff period, exported for the e2e test
	MaxJobBackOff = 360 * time.Second
)

Functions

func IsJobFinished

func IsJobFinished(j *batch.Job) bool

IsJobFinished checks whether the given Job has finished execution. It does not discriminate between successful and failed terminations.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller ensures that all Job objects have corresponding pods to run their configured workload.

func NewController

func NewController(podInformer coreinformers.PodInformer, jobInformer batchinformers.JobInformer, kubeClient clientset.Interface) *Controller

NewController creates a new Job controller that keeps the relevant pods in sync with their corresponding Job objects.

func (*Controller) Run

func (jm *Controller) Run(workers int, stopCh <-chan struct{})

Run the main goroutine responsible for watching and syncing jobs.

Source Files

doc.go job_controller.go utils.go

Directories

PathSynopsis
pkg/controller/job/config
pkg/controller/job/config/v1alpha1
Version
v1.19.4
Published
Nov 11, 2020
Platform
js/wasm
Imports
28 packages
Last checked
2 minutes ago

Tools for package owners.