File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Filter options
staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresourcedefinition Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ func CustomResourceDefinitionToSelectableFields(obj *apiextensions.CustomResourc
231
231
// dropDisabledFields drops disabled fields that are not used if their associated feature gates
232
232
// are not enabled.
233
233
func dropDisabledFields (newCRD * apiextensions.CustomResourceDefinition , oldCRD * apiextensions.CustomResourceDefinition ) {
234
- if ! utilfeature .DefaultFeatureGate .Enabled (apiextensionsfeatures .CRDValidationRatcheting ) && (oldCRD == nil || ( oldCRD != nil && ! specHasOptionalOldSelf (& oldCRD .Spec ) )) {
234
+ if ! utilfeature .DefaultFeatureGate .Enabled (apiextensionsfeatures .CRDValidationRatcheting ) && (oldCRD == nil || ! specHasOptionalOldSelf (& oldCRD .Spec )) {
235
235
if newCRD .Spec .Validation != nil {
236
236
dropOptionalOldSelfField (newCRD .Spec .Validation .OpenAPIV3Schema )
237
237
}
@@ -242,7 +242,7 @@ func dropDisabledFields(newCRD *apiextensions.CustomResourceDefinition, oldCRD *
242
242
}
243
243
}
244
244
}
245
- if ! utilfeature .DefaultFeatureGate .Enabled (apiextensionsfeatures .CustomResourceFieldSelectors ) && (oldCRD == nil || ( oldCRD != nil && ! specHasSelectableFields (& oldCRD .Spec ) )) {
245
+ if ! utilfeature .DefaultFeatureGate .Enabled (apiextensionsfeatures .CustomResourceFieldSelectors ) && (oldCRD == nil || ! specHasSelectableFields (& oldCRD .Spec )) {
246
246
dropSelectableFields (& newCRD .Spec )
247
247
}
248
248
}
You can’t perform that action at this time.
0 commit comments