package job
import "k8s.io/kubernetes/pkg/controller/job"
Package job contains logic for watching and synchronizing jobs.
Index ¶
Constants ¶
const ( // "key" OrphanPodKeyKindName orphanPodKeyKind = iota // "selector" OrphanPodKeyKindSelector )
Variables ¶
var ( // DefaultJobApiBackOff is the default API backoff period. Exported for tests. DefaultJobApiBackOff = time.Second // MaxJobApiBackOff is the max API backoff period. Exported for tests. MaxJobApiBackOff = time.Minute // DefaultJobPodFailureBackOff is the default pod failure backoff period. Exported for tests. DefaultJobPodFailureBackOff = 10 * time.Second // MaxJobPodFailureBackOff is the max pod failure backoff period. Exported for tests. MaxJobPodFailureBackOff = 10 * time.Minute // MaxUncountedPods is the maximum size the slices in // .status.uncountedTerminatedPods should have to keep their representation // roughly below 20 KB. Exported for tests MaxUncountedPods = 500 // MaxPodCreateDeletePerSync is the maximum number of pods that can be // created or deleted in a single sync call. Exported for tests. MaxPodCreateDeletePerSync = 500 )
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(ctx context.Context, podInformer coreinformers.PodInformer, jobInformer batchinformers.JobInformer, kubeClient clientset.Interface) (*Controller, error)
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(ctx context.Context, workers int)
Run the main goroutine responsible for watching and syncing jobs.
Source Files ¶
backoff_utils.go doc.go indexed_job_utils.go job_controller.go pod_failure_policy.go success_policy.go tracking_utils.go
Directories ¶
Path | Synopsis |
---|---|
pkg/controller/job/config | |
pkg/controller/job/config/v1alpha1 | |
pkg/controller/job/metrics | |
pkg/controller/job/util |
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 40 packages
- Last checked
- 3 hours ago –
Tools for package owners.