Skip to content

Commit

Permalink
Merge pull request #126136 from cici37/removeFG
Browse files Browse the repository at this point in the history
Remove feature gate CustomResourceValidationExpressions

Kubernetes-commit: 8f265b63050739937cd939c05a98def37002f1e8
  • Loading branch information
k8s-publishing-bot committed Jul 20, 2024
2 parents 64bd347 + 34ee2ac commit 21fdbb3
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef
k8s.io/apimachinery v0.0.0-20240719223001-62791ecbc514
k8s.io/apiserver v0.0.0-20240720024610-bd463169afb8
k8s.io/apiserver v0.0.0-20240720104541-d681845e4f6a
k8s.io/client-go v0.0.0-20240719063343-5130bd9e7862
k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c
k8s.io/component-base v0.0.0-20240715183844-6f32dbe8ef25
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef h1:srEy4lds3ddDhT+cxFy68Uvt3GVRTo3
k8s.io/api v0.0.0-20240720022854-7d5e5eaf3aef/go.mod h1:SvpyE6bmVBf1ly5BaD4y6yym4ZpHrV2pa8tTRjcglaA=
k8s.io/apimachinery v0.0.0-20240719223001-62791ecbc514 h1:r9/8IzTbEU+H8bAZ4DtiN8A4Lr7UXnfPoPsnbe50zZ8=
k8s.io/apimachinery v0.0.0-20240719223001-62791ecbc514/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
k8s.io/apiserver v0.0.0-20240720024610-bd463169afb8 h1:FhaX6BBO2L/1sd5/G1pB+2K2Afycrju0hgmDDS0vBmw=
k8s.io/apiserver v0.0.0-20240720024610-bd463169afb8/go.mod h1:UFdCOgZ0UgBzrSbF5rc3eVHS4OhIdbnIFYEITre8ZT8=
k8s.io/apiserver v0.0.0-20240720104541-d681845e4f6a h1:Hcn+rrkkCCMuRxtWTpGdVZhrkfKiQkZI+peIJIRuqnM=
k8s.io/apiserver v0.0.0-20240720104541-d681845e4f6a/go.mod h1:UFdCOgZ0UgBzrSbF5rc3eVHS4OhIdbnIFYEITre8ZT8=
k8s.io/client-go v0.0.0-20240719063343-5130bd9e7862 h1:7pxBn9PlLxKT4L7sh5YE3nUt6dBajHFY6MitAvQ0K4E=
k8s.io/client-go v0.0.0-20240719063343-5130bd9e7862/go.mod h1:Ku8rB5ecknMAlxaO9IDX/HkHUBKk6ku4yWmXJ3o4Uaw=
k8s.io/code-generator v0.0.0-20240720023521-ec3cc888df4c h1:oiNPH9Y/YrQfxo8eTW/w71aBrSyr9MX/wGBKTwDSZsc=
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/apiextensions/types_jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ type JSONSchemaProps struct {
XMapType *string

// x-kubernetes-validations -kubernetes-validations describes a list of validation rules written in the CEL expression language.
// This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
// +patchMergeKey=rule
// +patchStrategy=merge
// +listType=map
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/apiextensions/v1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/apis/apiextensions/v1/types_jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ type JSONSchemaProps struct {
XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"`

// x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
// This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
// +patchMergeKey=rule
// +patchStrategy=merge
// +listType=map
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/apiextensions/v1beta1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/apis/apiextensions/v1beta1/types_jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ type JSONSchemaProps struct {
XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"`

// x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
// This field is an alpha-level. Using this field requires the feature gate `CustomResourceValidationExpressions` to be enabled.
// +patchMergeKey=rule
// +patchStrategy=merge
// +listType=map
Expand Down
4 changes: 2 additions & 2 deletions pkg/generated/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions pkg/registry/customresource/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import (
"k8s.io/apimachinery/pkg/util/validation/field"
celconfig "k8s.io/apiserver/pkg/apis/cel"
"k8s.io/apiserver/pkg/cel/common"
"k8s.io/apiserver/pkg/features"
"k8s.io/apiserver/pkg/registry/generic"
apiserverstorage "k8s.io/apiserver/pkg/storage"
"k8s.io/apiserver/pkg/storage/names"
Expand Down Expand Up @@ -76,9 +75,7 @@ type selectableField struct {

func NewStrategy(typer runtime.ObjectTyper, namespaceScoped bool, kind schema.GroupVersionKind, schemaValidator, statusSchemaValidator validation.SchemaValidator, structuralSchema *structuralschema.Structural, status *apiextensions.CustomResourceSubresourceStatus, scale *apiextensions.CustomResourceSubresourceScale, selectableFields []v1.SelectableField) customResourceStrategy {
var celValidator *cel.Validator
if utilfeature.DefaultFeatureGate.Enabled(features.CustomResourceValidationExpressions) {
celValidator = cel.NewValidator(structuralSchema, true, celconfig.PerCallLimit) // CEL programs are compiled and cached here
}
celValidator = cel.NewValidator(structuralSchema, true, celconfig.PerCallLimit) // CEL programs are compiled and cached here

strategy := customResourceStrategy{
ObjectTyper: typer,
Expand Down

0 comments on commit 21fdbb3

Please sign in to comment.