diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 17fc53a7374f..1fc710a8846b 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -3671,7 +3671,7 @@ }, "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 JobTrackingWithFinalizers is enabled. Old jobs might not be tracked using this field, in which case the field remains null." + "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 beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null." } }, "type": "object" diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index 1e2e44a27696..ef81a8f27468 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -274,8 +274,9 @@ type JobStatus struct { // (3) Remove the pod UID from the array while increasing the corresponding // counter. // - // This field is alpha-level. The job controller only makes use of this field - // when the feature gate JobTrackingWithFinalizers is enabled. + // This field is beta-level. The job controller only makes use of this field + // when the feature gate JobTrackingWithFinalizers is enabled (enabled + // by default). // Old jobs might not be tracked using this field, in which case the field // remains null. // +optional diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index 3fdf0752ddef..8136391f1ad8 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -223,6 +223,7 @@ const ( // owner: @alculquicondor // alpha: v1.22 + // beta: v1.23 // // Track Job completion without relying on Pod remaining in the cluster // indefinitely. Pod finalizers, in addition to a field in the Job status @@ -826,7 +827,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS ProcMountType: {Default: false, PreRelease: featuregate.Alpha}, TTLAfterFinished: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.25 IndexedJob: {Default: true, PreRelease: featuregate.Beta}, - JobTrackingWithFinalizers: {Default: false, PreRelease: featuregate.Alpha}, + JobTrackingWithFinalizers: {Default: true, PreRelease: featuregate.Beta}, KubeletPodResources: {Default: true, PreRelease: featuregate.Beta}, LocalStorageCapacityIsolationFSQuotaMonitoring: {Default: false, PreRelease: featuregate.Alpha}, NonPreemptingPriority: {Default: true, PreRelease: featuregate.Beta}, diff --git a/staging/src/k8s.io/api/batch/v1/generated.proto b/staging/src/k8s.io/api/batch/v1/generated.proto index f85a329b298d..ffa0f90da424 100644 --- a/staging/src/k8s.io/api/batch/v1/generated.proto +++ b/staging/src/k8s.io/api/batch/v1/generated.proto @@ -331,8 +331,9 @@ message JobStatus { // (3) Remove the pod UID from the arrays while increasing the corresponding // counter. // - // This field is alpha-level. The job controller only makes use of this field - // when the feature gate JobTrackingWithFinalizers is enabled. + // This field is beta-level. The job controller only makes use of this field + // when the feature gate JobTrackingWithFinalizers is enabled (enabled + // by default). // Old jobs might not be tracked using this field, in which case the field // remains null. // +optional diff --git a/staging/src/k8s.io/api/batch/v1/types.go b/staging/src/k8s.io/api/batch/v1/types.go index ed52b6ffbfa6..beeaa8325a03 100644 --- a/staging/src/k8s.io/api/batch/v1/types.go +++ b/staging/src/k8s.io/api/batch/v1/types.go @@ -258,8 +258,9 @@ type JobStatus struct { // (3) Remove the pod UID from the arrays while increasing the corresponding // counter. // - // This field is alpha-level. The job controller only makes use of this field - // when the feature gate JobTrackingWithFinalizers is enabled. + // This field is beta-level. The job controller only makes use of this field + // when the feature gate JobTrackingWithFinalizers is enabled (enabled + // by default). // Old jobs might not be tracked using this field, in which case the field // remains null. // +optional diff --git a/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go index 0cc7e7d43d91..e27225457b0d 100644 --- a/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -136,7 +136,7 @@ var map_JobStatus = map[string]string{ "succeeded": "The number of pods which reached phase Succeeded.", "failed": "The number of pods which reached phase Failed.", "completedIndexes": "CompletedIndexes holds the completed indexes when .spec.completionMode = \"Indexed\" in a text format. The indexes are represented as decimal integers separated by commas. The numbers are listed in increasing order. Three or more consecutive numbers are compressed and represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as \"1,3-5,7\".", - "uncountedTerminatedPods": "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 JobTrackingWithFinalizers is enabled. Old jobs might not be tracked using this field, in which case the field remains null.", + "uncountedTerminatedPods": "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 beta-level. The job controller only makes use of this field when the feature gate JobTrackingWithFinalizers is enabled (enabled by default). Old jobs might not be tracked using this field, in which case the field remains null.", } func (JobStatus) SwaggerDoc() map[string]string { diff --git a/test/integration/job/job_test.go b/test/integration/job/job_test.go index 719f365f7d3b..e0425898d361 100644 --- a/test/integration/job/job_test.go +++ b/test/integration/job/job_test.go @@ -569,7 +569,7 @@ func TestSuspendJob(t *testing.T) { validate := func(s string, active int, status v1.ConditionStatus, reason string) { validateJobPodsStatus(ctx, t, clientSet, job, podsByStatus{ Active: active, - }, false) + }, true) job, err = clientSet.BatchV1().Jobs(ns.Name).Get(ctx, job.Name, metav1.GetOptions{}) if err != nil { t.Fatalf("Failed to get Job after %s: %v", s, err) @@ -615,7 +615,7 @@ func TestSuspendJobControllerRestart(t *testing.T) { } validateJobPodsStatus(ctx, t, clientSet, job, podsByStatus{ Active: 0, - }, false) + }, true) // Disable feature gate and restart controller to test that pods get created. defer featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, features.SuspendJob, false)() @@ -627,7 +627,7 @@ func TestSuspendJobControllerRestart(t *testing.T) { } validateJobPodsStatus(ctx, t, clientSet, job, podsByStatus{ Active: 2, - }, false) + }, true) } func TestNodeSelectorUpdate(t *testing.T) {