kubernetes/pkg/controller/job
Akhil Singh 2fe49b0cd0 Fix job controller reporting active=0 during pod creation backoff
When manageJob() needs to create replacement pods but defers creation
because a pod-failure backoff is still active, it returned a hardcoded
active=0 to the caller. Because no pods were actually created or deleted,
this left Status.Active=0 while Status.Ready still reflected the running
pods. The apiserver correctly rejects such updates ("cannot set more
ready pods than active") with a 422, which blocks flushing uncounted
terminated pods, removing finalizers, and updating job status, leaving
pods stuck Terminating with stale status.

Return the real active count from both backoff early-returns instead,
since the deferral does not change the number of active pods.

Issue: https://github.com/kubernetes/kubernetes/issues/139428
2026-06-09 18:55:28 +05:30
..
config Generate deepcopy 2026-05-11 12:27:56 -04:00
metrics Drop JobSuccessPolicy after the feature GA-ed in 1.33 2026-05-05 11:09:40 +02:00
util Implement Workload and PodGroup integration with Job controller 2026-03-18 20:32:37 +00:00
backoff_utils.go Remove SidecarContainers feature gate 2026-03-19 15:56:47 +08:00
backoff_utils_test.go Promote SidecarContainers feature to GA 2025-02-02 17:45:36 +09:00
doc.go remove import doc comments 2024-12-02 16:59:34 +01:00
indexed_job_utils.go Drop JobBackoffLimitPerIndex after the feature GA-ed in 1.33 2026-05-05 11:09:35 +02:00
indexed_job_utils_test.go Drop JobBackoffLimitPerIndex after the feature GA-ed in 1.33 2026-05-05 11:09:35 +02:00
job_controller.go Fix job controller reporting active=0 during pod creation backoff 2026-06-09 18:55:28 +05:30
job_controller_test.go Fix job controller reporting active=0 during pod creation backoff 2026-06-09 18:55:28 +05:30
job_scheduling_manager.go Remove v1alpha2 API definitions 2026-05-22 12:50:19 +00:00
job_scheduling_manager_test.go Migrate references to v1alpha3 in tests, controllers, and remaining files 2026-05-22 12:50:19 +00:00
OWNERS Self nominate tenzen-y as a reviewer for the Job controller 2024-10-30 01:14:47 +09:00
pod_failure_policy.go Drop JobBackoffLimitPerIndex after the feature GA-ed in 1.33 2026-05-05 11:09:35 +02:00
pod_failure_policy_test.go Drop JobBackoffLimitPerIndex after the feature GA-ed in 1.33 2026-05-05 11:09:35 +02:00
success_policy.go Drop JobPodReplacementPolicy after the feature GA-ed in 1.34 2026-05-07 12:05:44 +02:00
success_policy_test.go Drop JobSuccessPolicy after the feature GA-ed in 1.33 2026-05-05 11:09:40 +02:00
tracking_utils.go Update pkg/controller to use slices.Contains 2026-02-26 10:17:13 +01:00
tracking_utils_test.go clean up: remove loop variable capture 2026-04-28 23:53:27 +02:00