Add Job.status.uncountedPodUIDs

For tracking Job Pods that have finished but are not yet counted as failed or succeeded

And feature gate JobTrackingWithFinalizers

Change-Id: I3e080f3ec090922640384b692e88eaf9a544d3b5
This commit is contained in:
Aldo Culquicondor
2021-01-18 13:36:03 -05:00
parent 657c6fe033
commit bb56a0bd04
25 changed files with 1183 additions and 192 deletions

View File

@@ -3685,6 +3685,10 @@
"description": "The number of pods which reached phase Succeeded.",
"format": "int32",
"type": "integer"
},
"uncountedTerminatedPods": {
"$ref": "#/definitions/io.k8s.api.batch.v1.UncountedTerminatedPods",
"description": "UncountedTerminatedPods holds the UIDs of Pods that have terminated but the job controller hasn't yet accounted for in the status counters.\n\nThe job controller creates pods with a finalizer. When a pod terminates (succeeded or failed), the controller does three steps to account for it in the job status: (1) Add the pod UID to the arrays in this field. (2) Remove the pod finalizer. (3) Remove the pod UID from the arrays while increasing the corresponding\n counter.\n\nThis field is alpha-level. The job controller only makes use of this field when the feature gate PodTrackingWithFinalizers is enabled. Old jobs might not be tracked using this field, in which case the field remains null."
}
},
"type": "object"
@@ -3703,6 +3707,28 @@
},
"type": "object"
},
"io.k8s.api.batch.v1.UncountedTerminatedPods": {
"description": "UncountedTerminatedPods holds UIDs of Pods that have terminated but haven't been accounted in Job status counters.",
"properties": {
"failed": {
"description": "Failed holds UIDs of failed Pods.",
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "set"
},
"succeeded": {
"description": "Succeeded holds UIDs of succeeded Pods.",
"items": {
"type": "string"
},
"type": "array",
"x-kubernetes-list-type": "set"
}
},
"type": "object"
},
"io.k8s.api.batch.v1beta1.CronJob": {
"description": "CronJob represents the configuration of a single cron job.",
"properties": {