mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Graduate JobTrackingWithFinalizers to beta
Enable feature by default. Update integration tests for other features to assume that finalizers are present. Change-Id: Ie969344f572627dba882c0e862e5700dadaf3026
This commit is contained in:
parent
c2bff66b95
commit
2c1b3fdb5b
2
api/openapi-spec/swagger.json
generated
2
api/openapi-spec/swagger.json
generated
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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},
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user