Repository: kubernetes-sigs/kueue (2025-08-03T17:10:29Z)

Issue:
Remove deprecated ProvisioningRequest annotations
<!-- Please only use this template for submitting clean up requests -->

**What would you like to be cleaned**:
Since [this PR](https://github.com/kubernetes-sigs/kueue/pull/2726), we started supporting the new ProvisioningRequest annotations, but we did not remove deprecated annotations so that we can maintain backward compatibility with the previous ClusterAutoscaler versions.

So, based on the Kubernetes deprecation policy, as we discussed [here](https://github.com/kubernetes-sigs/kueue/pull/2726#discussion_r1697928601), we would like to stop using deprecated ProvisioningRequest annotations here:

https://github.com/kubernetes-sigs/kueue/blob/e34732589c27f1d82f4e90c0d15c59ebb5f05e28/pkg/controller/admissionchecks/provisioning/constants.go#L22-L23

**Why is this needed**:
Deprecated annotations will be removed in the future ClusterAutocaler version.



Discussion:
cc: @PBundyra @yaroslava-serdiuk 

/assign

Have https://github.com/kubernetes-sigs/kueue/pull/2753 up.
/priority important-long term

Deprecation should once 1.29 is out of support.
@kannon92: The label(s) `priority/important-long, priority/term` cannot be applied, because the repository doesn't have them.

<details>

In response to [this](https://github.com/kubernetes-sigs/kueue/issues/2747#issuecomment-2265208732):

>/priority important-long term
>
>Deprecation should once 1.29 is out of support.


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
</details>
/priority important-longterm
IIUC https://github.com/kubernetes-sigs/kueue/pull/2753#issuecomment-2264632961, we should wait until 1.30.1 is EOL. 
This will take something like a year.
> IIUC [#2753 (comment)](https://github.com/kubernetes-sigs/kueue/pull/2753#issuecomment-2264632961), we should wait until 1.30.1 is EOL. This will take something like a year.

I think so too.

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity, `lifecycle/stale` is applied
- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied
- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed

You can:
- Mark this issue as fresh with `/remove-lifecycle stale`
- Close this issue with `/close`
- Offer to help out with [Issue Triage][1]

Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community).

/lifecycle stale

[1]: https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity, `lifecycle/stale` is applied
- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied
- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed

You can:
- Mark this issue as fresh with `/remove-lifecycle stale`
- Close this issue with `/close`
- Offer to help out with [Issue Triage][1]

Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community).

/lifecycle stale

[1]: https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity, `lifecycle/stale` is applied
- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied
- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed

You can:
- Mark this issue as fresh with `/remove-lifecycle stale`
- Close this issue with `/close`
- Offer to help out with [Issue Triage][1]

Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community).

/lifecycle stale

[1]: https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-lifecycle stale


The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity, `lifecycle/stale` is applied
- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied
- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed

You can:
- Mark this issue as fresh with `/remove-lifecycle stale`
- Close this issue with `/close`
- Offer to help out with [Issue Triage][1]

Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community).

/lifecycle stale

[1]: https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-lifecycle stale
This is probably actionable now.

Opened https://github.com/kubernetes-sigs/kueue/pull/6381



Patch:
diff --git a/pkg/controller/admissionchecks/provisioning/constants.go b/pkg/controller/admissionchecks/provisioning/constants.go
index 551aae67660..e6eda511b3f 100644
--- a/pkg/controller/admissionchecks/provisioning/constants.go
+++ b/pkg/controller/admissionchecks/provisioning/constants.go
@@ -17,11 +17,10 @@ limitations under the License.
 package provisioning
 
 const (
-	ConfigKind                       = "ProvisioningRequestConfig"
-	DeprecatedConsumesAnnotationKey  = "cluster-autoscaler.kubernetes.io/consume-provisioning-request"
-	DeprecatedClassNameAnnotationKey = "cluster-autoscaler.kubernetes.io/provisioning-class-name"
-	ConsumesAnnotationKey            = "autoscaling.x-k8s.io/consume-provisioning-request"
-	ClassNameAnnotationKey           = "autoscaling.x-k8s.io/provisioning-class-name"
+	ConfigKind             = "ProvisioningRequestConfig"
+	ControllerName         = "kueue.x-k8s.io/provisioning-request"
+	ConsumesAnnotationKey  = "autoscaling.x-k8s.io/consume-provisioning-request"
+	ClassNameAnnotationKey = "autoscaling.x-k8s.io/provisioning-class-name"
 
 	CheckInactiveMessage = "the check is not active"
 	NoRequestNeeded      = "the provisioning request is not needed"
diff --git a/pkg/controller/admissionchecks/provisioning/controller.go b/pkg/controller/admissionchecks/provisioning/controller.go
index 7feca94b8d9..86f2522dda6 100644
--- a/pkg/controller/admissionchecks/provisioning/controller.go
+++ b/pkg/controller/admissionchecks/provisioning/controller.go
@@ -624,10 +624,8 @@ func podSetUpdates(log logr.Logger, wl *kueue.Workload, pr *autoscaling.Provisio
 		podSetUpdate := kueue.PodSetUpdate{
 			Name: refMap[ps.PodTemplateRef.Name],
 			Annotations: map[string]string{
-				DeprecatedConsumesAnnotationKey:  pr.Name,
-				DeprecatedClassNameAnnotationKey: pr.Spec.ProvisioningClassName,
-				ConsumesAnnotationKey:            pr.Name,
-				ClassNameAnnotationKey:           pr.Spec.ProvisioningClassName},
+				ConsumesAnnotationKey:  pr.Name,
+				ClassNameAnnotationKey: pr.Spec.ProvisioningClassName},
 		}
 		if psUpdate := prc.Spec.PodSetUpdates; psUpdate != nil {
 			podSetUpdate.NodeSelector = make(map[string]string, len(psUpdate.NodeSelector))


Test patch:
diff --git a/pkg/controller/admissionchecks/provisioning/controller_test.go b/pkg/controller/admissionchecks/provisioning/controller_test.go
index d71634987c0..ed7c229d179 100644
--- a/pkg/controller/admissionchecks/provisioning/controller_test.go
+++ b/pkg/controller/admissionchecks/provisioning/controller_test.go
@@ -616,19 +616,15 @@ func TestReconcile(t *testing.T) {
 							{
 								Name: "ps1",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 							},
 							{
 								Name: "ps2",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 							},
 						},
@@ -1181,10 +1177,8 @@ func TestReconcile(t *testing.T) {
 							{
 								Name: "ps1",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 								NodeSelector: map[string]string{
 									"node-selector-key": "nodes-selector-xyz",
@@ -1193,10 +1187,8 @@ func TestReconcile(t *testing.T) {
 							{
 								Name: "ps2",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 								NodeSelector: map[string]string{
 									"node-selector-key": "nodes-selector-xyz",
@@ -1234,19 +1226,15 @@ func TestReconcile(t *testing.T) {
 							{
 								Name: "ps1",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 							},
 							{
 								Name: "ps2",
 								Annotations: map[string]string{
-									DeprecatedConsumesAnnotationKey:  "wl-check1-1",
-									DeprecatedClassNameAnnotationKey: "class1",
-									ConsumesAnnotationKey:            "wl-check1-1",
-									ClassNameAnnotationKey:           "class1",
+									ConsumesAnnotationKey:  "wl-check1-1",
+									ClassNameAnnotationKey: "class1",
 								},
 							},
 						},
diff --git a/test/integration/singlecluster/controller/admissionchecks/provisioning/provisioning_test.go b/test/integration/singlecluster/controller/admissionchecks/provisioning/provisioning_test.go
index 111ff3105ae..2f17866a553 100644
--- a/test/integration/singlecluster/controller/admissionchecks/provisioning/provisioning_test.go
+++ b/test/integration/singlecluster/controller/admissionchecks/provisioning/provisioning_test.go
@@ -302,19 +302,15 @@ var _ = ginkgo.Describe("Provisioning", ginkgo.Ordered, ginkgo.ContinueOnFailure
 						{
 							Name: "ps1",
 							Annotations: map[string]string{
-								provisioning.ConsumesAnnotationKey:            provReqKey.Name,
-								provisioning.DeprecatedConsumesAnnotationKey:  provReqKey.Name,
-								provisioning.ClassNameAnnotationKey:           prc.Spec.ProvisioningClassName,
-								provisioning.DeprecatedClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
+								provisioning.ConsumesAnnotationKey:  provReqKey.Name,
+								provisioning.ClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
 							},
 						},
 						{
 							Name: "ps2",
 							Annotations: map[string]string{
-								provisioning.ConsumesAnnotationKey:            provReqKey.Name,
-								provisioning.DeprecatedConsumesAnnotationKey:  provReqKey.Name,
-								provisioning.ClassNameAnnotationKey:           prc.Spec.ProvisioningClassName,
-								provisioning.DeprecatedClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
+								provisioning.ConsumesAnnotationKey:  provReqKey.Name,
+								provisioning.ClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
 							},
 						},
 					}))
@@ -747,19 +743,15 @@ var _ = ginkgo.Describe("Provisioning", ginkgo.Ordered, ginkgo.ContinueOnFailure
 						{
 							Name: "ps1",
 							Annotations: map[string]string{
-								provisioning.ConsumesAnnotationKey:            provReqKey.Name,
-								provisioning.DeprecatedConsumesAnnotationKey:  provReqKey.Name,
-								provisioning.ClassNameAnnotationKey:           prc.Spec.ProvisioningClassName,
-								provisioning.DeprecatedClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
+								provisioning.ConsumesAnnotationKey:  provReqKey.Name,
+								provisioning.ClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
 							},
 						},
 						{
 							Name: "ps2",
 							Annotations: map[string]string{
-								provisioning.ConsumesAnnotationKey:            provReqKey.Name,
-								provisioning.DeprecatedConsumesAnnotationKey:  provReqKey.Name,
-								provisioning.ClassNameAnnotationKey:           prc.Spec.ProvisioningClassName,
-								provisioning.DeprecatedClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
+								provisioning.ConsumesAnnotationKey:  provReqKey.Name,
+								provisioning.ClassNameAnnotationKey: prc.Spec.ProvisioningClassName,
 							},
 						},
 					}))