Skip to content

Job status.conditions behavior change 1.31 -> 1.32 #132144

Open
@jb-metzger

Description

@jb-metzger

What happened?

In version 1.32.0 apply job with spec.completions=0 and spec.suspend=true:

apiVersion: batch/v1
kind: Job
metadata:
  name: suspended-zero-completions 
  namespace: default
spec:
  completions: 0
  suspend: true
  template:
    spec:
      containers: 
      - name: noop
        image: busybox
        command: ["true"] 
      restartPolicy: Never

Job ends up with conditions:

  status:
    conditions:
    - lastProbeTime: "2025-06-06T09:44:17Z"
      lastTransitionTime: "2025-06-06T09:44:17Z"
      message: Reached expected number of succeeded pods
      reason: CompletionsReached
      status: "True"
      type: SuccessCriteriaMet

and STATUS=Running

NAME                         STATUS    COMPLETIONS   DURATION   AGE
suspended-zero-completions   Running   0/0                      2s

What did you expect to happen?

To have the same behavior as with version 1.31.9 when applying same job.
That is expecting following conditions:

status:
    completionTime: "2025-06-06T09:40:50Z"
    conditions:
    - lastProbeTime: "2025-06-06T09:40:50Z"
      lastTransitionTime: "2025-06-06T09:40:50Z"
      message: Reached expected number of succeeded pods
      reason: CompletionsReached
      status: "True"
      type: SuccessCriteriaMet
    - lastProbeTime: "2025-06-06T09:40:50Z"
      lastTransitionTime: "2025-06-06T09:40:50Z"
      message: Reached expected number of succeeded pods
      reason: CompletionsReached
      status: "True"
      type: Complete

and STATUS=Complete

NAME                         STATUS     COMPLETIONS   DURATION   AGE
suspended-zero-completions   Complete   0/0                      11m

How can we reproduce it (as minimally and precisely as possible)?

Apply job provided above to version 1.31 and version 1.32 and observe difference.

Anything else we need to know?

If this is an intended change have release notes mention the change in behavior.

Kubernetes version

$ kubectl version
Client Version: v1.33.0
Kustomize Version: v5.6.0
Server Version: v1.32.0+k3s1

Cloud provider

Irrelevant, core component.

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Install tools

Container runtime (CRI) and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/appsCategorizes an issue or PR as relevant to SIG Apps.

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions