Skip to content

Commit 83effda

Browse files
nerdeveloperSingularity23x0
authored andcommitted
v1beta2: Remove deprecated retryDelayMinutes field and fix conversion (kubernetes-sigs#7407)
- Remove retryDelayMinutes field from AdmissionCheckSpec in v1beta2 - Add conversion function for AdmissionCheckSpec from v1beta1 to v1beta2 - Update CRD, generated code, and documentation - Update integration tests to reflect changes
1 parent 8c973f5 commit 83effda

File tree

9 files changed

+61
-69
lines changed

9 files changed

+61
-69
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
Copyright The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1beta1
18+
19+
import (
20+
conversionapi "k8s.io/apimachinery/pkg/conversion"
21+
22+
"sigs.k8s.io/kueue/apis/kueue/v1beta2"
23+
)
24+
25+
//lint:file-ignore ST1003 "generated Convert_* calls below use underscores"
26+
//revive:disable:var-naming
27+
28+
func Convert_v1beta1_AdmissionCheckSpec_To_v1beta2_AdmissionCheckSpec(in *AdmissionCheckSpec, out *v1beta2.AdmissionCheckSpec, s conversionapi.Scope) error {
29+
return autoConvert_v1beta1_AdmissionCheckSpec_To_v1beta2_AdmissionCheckSpec(in, out, s)
30+
}

apis/kueue/v1beta1/zz_generated.conversion.go

Lines changed: 28 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/kueue/v1beta2/admissioncheck_types.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ type AdmissionCheckSpec struct {
5454
// +kubebuilder:validation:MinLength=1
5555
ControllerName string `json:"controllerName"`
5656

57-
// retryDelayMinutes specifies how long to keep the workload suspended after
58-
// a failed check (after it transitioned to False). When the delay period has passed, the check
59-
// state goes to "Unknown". The default is 15 min.
60-
// +optional
61-
// +kubebuilder:default=15
62-
// Deprecated: retryDelayMinutes has already been deprecated since v0.8 and will be removed in v1beta2.
63-
RetryDelayMinutes *int64 `json:"retryDelayMinutes,omitempty"`
64-
6557
// parameters identifies a configuration with additional parameters for the
6658
// check.
6759
// +optional

apis/kueue/v1beta2/zz_generated.deepcopy.go

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/kueue/templates/crd/kueue.x-k8s.io_admissionchecks.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,6 @@ spec:
236236
- kind
237237
- name
238238
type: object
239-
retryDelayMinutes:
240-
default: 15
241-
description: |-
242-
retryDelayMinutes specifies how long to keep the workload suspended after
243-
a failed check (after it transitioned to False). When the delay period has passed, the check
244-
state goes to "Unknown". The default is 15 min.
245-
Deprecated: retryDelayMinutes has already been deprecated since v0.8 and will be removed in v1beta2.
246-
format: int64
247-
type: integer
248239
required:
249240
- controllerName
250241
type: object

client-go/applyconfiguration/kueue/v1beta2/admissioncheckspec.go

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/components/crd/bases/kueue.x-k8s.io_admissionchecks.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,6 @@ spec:
215215
- kind
216216
- name
217217
type: object
218-
retryDelayMinutes:
219-
default: 15
220-
description: |-
221-
retryDelayMinutes specifies how long to keep the workload suspended after
222-
a failed check (after it transitioned to False). When the delay period has passed, the check
223-
state goes to "Unknown". The default is 15 min.
224-
Deprecated: retryDelayMinutes has already been deprecated since v0.8 and will be removed in v1beta2.
225-
format: int64
226-
type: integer
227218
required:
228219
- controllerName
229220
type: object

site/content/en/docs/reference/kueue.v1beta2.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -498,16 +498,6 @@ The description is limited to a maximum of 2048 characters.</p>
498498
not necessarily a Kubernetes Pod or Deployment name. Cannot be empty.</p>
499499
</td>
500500
</tr>
501-
<tr><td><code>retryDelayMinutes</code><br/>
502-
<code>int64</code>
503-
</td>
504-
<td>
505-
<p>retryDelayMinutes specifies how long to keep the workload suspended after
506-
a failed check (after it transitioned to False). When the delay period has passed, the check
507-
state goes to &quot;Unknown&quot;. The default is 15 min.
508-
Deprecated: retryDelayMinutes has already been deprecated since v0.8 and will be removed in v1beta2.</p>
509-
</td>
510-
</tr>
511501
<tr><td><code>parameters</code><br/>
512502
<a href="#kueue-x-k8s-io-v1beta2-AdmissionCheckParametersReference"><code>AdmissionCheckParametersReference</code></a>
513503
</td>

test/integration/singlecluster/webhook/core/admissioncheck_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"github.com/onsi/gomega"
2525
"github.com/onsi/gomega/types"
2626
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27-
"k8s.io/utils/ptr"
2827
"sigs.k8s.io/controller-runtime/pkg/client"
2928
"sigs.k8s.io/controller-runtime/pkg/manager"
3029

@@ -67,8 +66,7 @@ var _ = ginkgo.Describe("AdmissionCheck Webhook", ginkgo.Ordered, func() {
6766
Name: "foo",
6867
},
6968
Spec: kueue.AdmissionCheckSpec{
70-
ControllerName: "ac-controller",
71-
RetryDelayMinutes: ptr.To[int64](15),
69+
ControllerName: "ac-controller",
7270
},
7371
},
7472
),

0 commit comments

Comments
 (0)