mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
chore: bump DefaultKubeBinaryVersion to 1.32, make 1.32 CEL changes, fix int tests to handle 1 version off API deprecation, and fix prerelease-lifecycle-gen for # of APIs
This commit is contained in:
parent
e35bd86edd
commit
701e6c7ab1
@ -142,7 +142,6 @@ func (s CompletedOptions) Validate() []error {
|
||||
errs = append(errs, fmt.Errorf("--apiserver-count should be a positive number, but value '%d' provided", s.MasterCount))
|
||||
}
|
||||
|
||||
// TODO(#125980): remove in 1.32
|
||||
effectiveVersion := s.GenericServerRunOptions.ComponentGlobalsRegistry.EffectiveVersionFor(s.GenericServerRunOptions.ComponentName)
|
||||
if err := utilversion.ValidateKubeEffectiveVersion(effectiveVersion); err != nil {
|
||||
errs = append(errs, err)
|
||||
|
@ -279,7 +279,6 @@ func (o *Options) Validate() []error {
|
||||
errs = append(errs, o.Authorization.Validate()...)
|
||||
errs = append(errs, o.Metrics.Validate()...)
|
||||
|
||||
// TODO(#125980): remove in 1.32
|
||||
effectiveVersion := o.ComponentGlobalsRegistry.EffectiveVersionFor(utilversion.DefaultKubeComponent)
|
||||
if err := utilversion.ValidateKubeEffectiveVersion(effectiveVersion); err != nil {
|
||||
errs = append(errs, err)
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +k8s:prerelease-lifecycle-gen=true
|
||||
// +groupName=admissionregistration.k8s.io
|
||||
|
||||
// Package v1alpha1 is the v1alpha1 version of the API.
|
||||
|
94
staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go
generated
Normal file
94
staging/src/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go
generated
Normal file
@ -0,0 +1,94 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 26
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 29
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 32
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ValidatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 26
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 29
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 32
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ValidatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 26
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 29
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 32
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ValidatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 26
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 29
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ValidatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 32
|
||||
}
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||
// +k8s:openapi-gen=true
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
|
||||
// +k8s:prerelease-lifecycle-gen=true
|
||||
// +groupName=resource.k8s.io
|
||||
|
||||
// Package v1alpha3 is the v1alpha3 version of the resource API.
|
||||
|
@ -298,7 +298,7 @@ type ResourceSliceList struct {
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// ResourceClaim describes a request for access to resources in the cluster,
|
||||
// for use by workloads. For example, if a workload needs an accelerator device
|
||||
@ -815,7 +815,7 @@ const (
|
||||
)
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// ResourceClaimList is a collection of claims.
|
||||
type ResourceClaimList struct {
|
||||
@ -830,7 +830,7 @@ type ResourceClaimList struct {
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// PodSchedulingContext objects hold information that is needed to schedule
|
||||
// a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation
|
||||
@ -916,7 +916,7 @@ type ResourceClaimSchedulingStatus struct {
|
||||
const PodSchedulingNodeListMaxSize = 128
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// PodSchedulingContextList is a collection of Pod scheduling objects.
|
||||
type PodSchedulingContextList struct {
|
||||
@ -1000,7 +1000,7 @@ type DeviceClassConfiguration struct {
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// DeviceClassList is a collection of classes.
|
||||
type DeviceClassList struct {
|
||||
@ -1015,7 +1015,7 @@ type DeviceClassList struct {
|
||||
|
||||
// +genclient
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// ResourceClaimTemplate is used to produce ResourceClaim objects.
|
||||
//
|
||||
@ -1050,7 +1050,7 @@ type ResourceClaimTemplateSpec struct {
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.26
|
||||
// +k8s:prerelease-lifecycle-gen:introduced=1.31
|
||||
|
||||
// ResourceClaimTemplateList is a collection of claim templates.
|
||||
type ResourceClaimTemplateList struct {
|
||||
|
202
staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
Normal file
202
staging/src/k8s.io/api/resource/v1alpha3/zz_generated.prerelease-lifecycle.go
generated
Normal file
@ -0,0 +1,202 @@
|
||||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by prerelease-lifecycle-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha3
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *DeviceClass) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *DeviceClass) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *DeviceClass) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *DeviceClassList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *DeviceClassList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *DeviceClassList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *PodSchedulingContext) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *PodSchedulingContext) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *PodSchedulingContext) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *PodSchedulingContextList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *PodSchedulingContextList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *PodSchedulingContextList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceClaim) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceClaim) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceClaim) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceClaimList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceClaimList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceClaimList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceClaimTemplate) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceClaimTemplate) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceClaimTemplate) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceClaimTemplateList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceClaimTemplateList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceClaimTemplateList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceSlice) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceSlice) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceSlice) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
||||
|
||||
// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go.
|
||||
func (in *ResourceSliceList) APILifecycleIntroduced() (major, minor int) {
|
||||
return 1, 31
|
||||
}
|
||||
|
||||
// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor.
|
||||
func (in *ResourceSliceList) APILifecycleDeprecated() (major, minor int) {
|
||||
return 1, 34
|
||||
}
|
||||
|
||||
// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison.
|
||||
// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor.
|
||||
func (in *ResourceSliceList) APILifecycleRemoved() (major, minor int) {
|
||||
return 1, 37
|
||||
}
|
@ -693,8 +693,9 @@ func TestCelCompilation(t *testing.T) {
|
||||
},
|
||||
},
|
||||
expectedResults: []validationMatcher{
|
||||
invalidError("undefined field 'namespace'"),
|
||||
invalidError("undefined field 'if'"),
|
||||
// starting 1.32, the preserved keyword as field name would be supported.
|
||||
noError(),
|
||||
noError(),
|
||||
invalidError("found no matching overload"),
|
||||
},
|
||||
},
|
||||
|
@ -2104,6 +2104,26 @@ func TestValidationExpressions(t *testing.T) {
|
||||
`cidr('::1/128').ip().family() == 6`,
|
||||
},
|
||||
},
|
||||
{name: "format",
|
||||
obj: objs("20", "200M"),
|
||||
schema: schemas(stringType, stringType),
|
||||
valid: []string{
|
||||
`format.dns1123Label().validate("my-label-name") == optional.none()`,
|
||||
`format.dns1123Subdomain().validate("apiextensions.k8s.io") == optional.none()`,
|
||||
`format.qualifiedName().validate("apiextensions.k8s.io/v1beta1") == optional.none()`,
|
||||
`format.dns1123LabelPrefix().validate("my-label-prefix-") == optional.none()`,
|
||||
`format.dns1123SubdomainPrefix().validate("mysubdomain.prefix.-") == optional.none()`,
|
||||
`format.dns1035LabelPrefix().validate("my-label-prefix-") == optional.none()`,
|
||||
`format.uri().validate("http://example.com") == optional.none()`,
|
||||
`format.uuid().validate("123e4567-e89b-12d3-a456-426614174000") == optional.none()`,
|
||||
`format.byte().validate("aGVsbG8=") == optional.none()`,
|
||||
`format.date().validate("2021-01-01") == optional.none()`,
|
||||
`format.datetime().validate("2021-01-01T00:00:00Z") == optional.none()`,
|
||||
`format.named("dns1123Label").value().validate("my-name") == optional.none()`,
|
||||
`format.dns1123Label().validate("contains a space").value()[0] == "a lowercase RFC 1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character (e.g. \'my-name\', or \'123-abc\', regex used for validation is \'[a-z0-9]([-a-z0-9]*[a-z0-9])?\')"`,
|
||||
`!format.named("unknown").hasValue()`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for i := range tests {
|
||||
|
@ -156,6 +156,9 @@ func testWebhookConverter(t *testing.T, watchCache bool) {
|
||||
},
|
||||
}
|
||||
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
// TODO: Added for integration testing of conversion webhooks, where decode errors due to conversion webhook failures need to be tested.
|
||||
// Maybe we should identify conversion webhook related errors in decoding to avoid triggering this? Or maybe having this special casing
|
||||
// of test cases in production code should be removed?
|
||||
|
@ -169,7 +169,6 @@ func DefaultKubeEffectiveVersion() MutableEffectiveVersion {
|
||||
}
|
||||
|
||||
// ValidateKubeEffectiveVersion validates the EmulationVersion is equal to the binary version at 1.31 for kube components.
|
||||
// TODO: remove in 1.32
|
||||
// emulationVersion is introduced in 1.31, so it is only allowed to be equal to the binary version at 1.31.
|
||||
func ValidateKubeEffectiveVersion(effectiveVersion EffectiveVersion) error {
|
||||
binaryVersion := version.MajorMinor(effectiveVersion.BinaryVersion().Major(), effectiveVersion.BinaryVersion().Minor())
|
||||
|
@ -66,5 +66,5 @@ const (
|
||||
// DefaultKubeBinaryVersion is the hard coded k8 binary version based on the latest K8s release.
|
||||
// It is supposed to be consistent with gitMajor and gitMinor, except for local tests, where gitMajor and gitMinor are "".
|
||||
// Should update for each minor release!
|
||||
DefaultKubeBinaryVersion = "1.31"
|
||||
DefaultKubeBinaryVersion = "1.32"
|
||||
)
|
||||
|
@ -405,6 +405,10 @@ func createV1alpha1ValidatingPolicyAndBinding(client clientset.Interface, conver
|
||||
// This test tries to mirror very closely the same test for webhook admission
|
||||
// test/integration/apiserver/admissionwebhook/admission_test.go testWebhookAdmission
|
||||
func TestPolicyAdmission(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
// TODO: Remove this line once admissionregistration v1alpha1 types to be removed in 1.32 are fully removed
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
holder := &policyExpectationHolder{
|
||||
holder: holder{
|
||||
t: t,
|
||||
|
@ -38,6 +38,10 @@ import (
|
||||
)
|
||||
|
||||
func TestGetsSelfAttributes(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
// TODO: Remove this line once authentication v1alpha1 types to be removed in 1.32 are fully removed
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
userInfo *user.DefaultInfo
|
||||
|
@ -37,6 +37,10 @@ import (
|
||||
// Verifies that the ClusterTrustBundle attest admission plugin correctly
|
||||
// enforces that a user has "attest" on the affected signer name.
|
||||
func TestCTBAttestPlugin(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
// TODO: Remove this line once certificates v1alpha1 types to be removed in 1.32 are fully removed
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
testCases := []struct {
|
||||
description string
|
||||
trustBundleName string
|
||||
|
@ -31,6 +31,10 @@ import (
|
||||
)
|
||||
|
||||
func TestCTBSignerNameFieldSelector(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
// TODO: Remove this line once certificates v1alpha1 types to be removed in 1.32 are fully removed
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
server := kubeapiservertesting.StartTestServerOrDie(t, nil, []string{"--feature-gates=ClusterTrustBundle=true"}, framework.SharedEtcd())
|
||||
|
@ -32,6 +32,10 @@ import (
|
||||
)
|
||||
|
||||
func TestCTBSignerNameChangeForbidden(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
// TODO: Remove this line once certificates v1alpha1 types to be removed in 1.32 are fully removed
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
testCases := []struct {
|
||||
objectName string
|
||||
signer1 string
|
||||
|
@ -618,6 +618,9 @@ resources:
|
||||
endpoint: unix:///@encrypt-all-kms-provider.sock
|
||||
`
|
||||
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
t.Run("encrypt all resources", func(t *testing.T) {
|
||||
_ = mock.NewBase64Plugin(t, "@encrypt-all-kms-provider.sock")
|
||||
// To ensure we are checking all REST resources
|
||||
|
@ -71,6 +71,9 @@ var allowMissingTestdataFixtures = map[schema.GroupVersionKind]bool{
|
||||
// It will also fail when a type gets moved to a different location. Be very careful in this situation because
|
||||
// it essentially means that you will be break old clusters unless you create some migration path for the old data.
|
||||
func TestEtcdStoragePath(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, "AllAlpha", true)
|
||||
featuregatetesting.SetFeatureGateDuringTest(t, feature.DefaultFeatureGate, "AllBeta", true)
|
||||
|
||||
|
@ -101,6 +101,9 @@ func TestAPIServerStorageMetrics(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAPIServerMetrics(t *testing.T) {
|
||||
// KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE allows for APIs pending removal to not block tests
|
||||
t.Setenv("KUBE_APISERVER_SERVE_REMOVED_APIS_FOR_ONE_RELEASE", "true")
|
||||
|
||||
s := kubeapiservertesting.StartTestServerOrDie(t, nil, framework.DefaultTestServerFlags(), framework.SharedEtcd())
|
||||
defer s.TearDownFn()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user