...

Source file src/k8s.io/apiextensions-apiserver/pkg/features/kube_features.go

Documentation: k8s.io/apiextensions-apiserver/pkg/features

     1  /*
     2  Copyright 2017 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 features
    18  
    19  import (
    20  	utilfeature "k8s.io/apiserver/pkg/util/feature"
    21  	"k8s.io/component-base/featuregate"
    22  )
    23  
    24  const (
    25  	// Every feature gate should add method here following this template:
    26  	//
    27  	// // owner: @username
    28  	// // alpha: v1.4
    29  	// MyFeature() bool
    30  
    31  	// owner: @alexzielenski
    32  	// alpha: v1.28
    33  	//
    34  	// Ignores errors raised on unchanged fields of Custom Resources
    35  	// across UPDATE/PATCH requests.
    36  	CRDValidationRatcheting featuregate.Feature = "CRDValidationRatcheting"
    37  
    38  	// owner: @jpbetz
    39  	// alpha: v1.30
    40  	//
    41  	// CustomResourceDefinitions may include SelectableFields to declare which fields
    42  	// may be used as field selectors.
    43  	CustomResourceFieldSelectors featuregate.Feature = "CustomResourceFieldSelectors"
    44  )
    45  
    46  func init() {
    47  	utilfeature.DefaultMutableFeatureGate.Add(defaultKubernetesFeatureGates)
    48  }
    49  
    50  // defaultKubernetesFeatureGates consists of all known Kubernetes-specific feature keys.
    51  // To add a new feature, define a key for it above and add it here. The features will be
    52  // available throughout Kubernetes binaries.
    53  var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
    54  	CRDValidationRatcheting:      {Default: true, PreRelease: featuregate.Beta},
    55  	CustomResourceFieldSelectors: {Default: false, PreRelease: featuregate.Alpha},
    56  }
    57  

View as plain text