From db940099816bdc59f71ec16516e33881fab10f8b Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Fri, 25 Oct 2024 16:09:54 +0200 Subject: [PATCH] Promote job creation timestamp annotation to stable Signed-off-by: Maciej Szulik --- pkg/features/kube_features.go | 2 ++ pkg/features/versioned_kube_features.go | 1 + staging/src/k8s.io/api/batch/v1/types.go | 1 - .../featuregates_linter/test_data/versioned_feature_list.yaml | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index de48eb83d42..b28974801a5 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -147,6 +147,8 @@ const ( ContainerCheckpoint featuregate.Feature = "ContainerCheckpoint" // owner: @helayoty + // kep: https://kep.k8s.io/4026 + // // Set the scheduled time as an annotation in the job. CronJobsScheduledAnnotation featuregate.Feature = "CronJobsScheduledAnnotation" diff --git a/pkg/features/versioned_kube_features.go b/pkg/features/versioned_kube_features.go index 5fb54c41247..b27a2770f7f 100644 --- a/pkg/features/versioned_kube_features.go +++ b/pkg/features/versioned_kube_features.go @@ -114,6 +114,7 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate CronJobsScheduledAnnotation: { {Version: version.MustParse("1.28"), Default: true, PreRelease: featuregate.Beta}, + {Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.35 }, // inherited features from apiextensions-apiserver, relisted here to get a conflict if it is changed diff --git a/staging/src/k8s.io/api/batch/v1/types.go b/staging/src/k8s.io/api/batch/v1/types.go index 30b79ff969a..8e9a761b955 100644 --- a/staging/src/k8s.io/api/batch/v1/types.go +++ b/staging/src/k8s.io/api/batch/v1/types.go @@ -29,7 +29,6 @@ const ( // CronJobScheduledTimestampAnnotation is the scheduled timestamp annotation for the Job. // It records the original/expected scheduled timestamp for the running job, represented in RFC3339. - // The CronJob controller adds this annotation if the CronJobsScheduledAnnotation feature gate (beta in 1.28) is enabled. CronJobScheduledTimestampAnnotation = labelPrefix + "cronjob-scheduled-timestamp" JobCompletionIndexAnnotation = labelPrefix + "job-completion-index" diff --git a/test/featuregates_linter/test_data/versioned_feature_list.yaml b/test/featuregates_linter/test_data/versioned_feature_list.yaml index 69d66a675f9..817a665ab3f 100644 --- a/test/featuregates_linter/test_data/versioned_feature_list.yaml +++ b/test/featuregates_linter/test_data/versioned_feature_list.yaml @@ -286,6 +286,10 @@ lockToDefault: false preRelease: Beta version: "1.28" + - default: true + lockToDefault: true + preRelease: GA + version: "1.32" - name: CrossNamespaceVolumeDataSource versionedSpecs: - default: false