mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-25 14:06:46 +00:00
Add CBOR feature gates.
For alpha, there is one apiserver feature gate and two client-go feature gates controlling CBOR. They were initially wired to separate test-only feature gate instances in order to prevent them from being configurable at runtime via command-line flags or environment variables (for client-go feature gates outside of Kubernetes components). All of the integration tests required by the KEP as alpha criteria have been implemented. This adds the feature gates to the usual feature gate instances and removes the temporary code to support separate test-only feature gate instances.
This commit is contained in:
@@ -67,3 +67,10 @@ func (a *clientAdapter) Add(in map[clientfeatures.Feature]clientfeatures.Feature
|
||||
}
|
||||
return a.mfg.Add(out)
|
||||
}
|
||||
|
||||
// Set implements the unexported interface that client-go feature gate testing expects for
|
||||
// ek8s.io/client-go/features/testing.SetFeatureDuringTest. This is necessary for integration tests
|
||||
// to set test overrides for client-go feature gates.
|
||||
func (a *clientAdapter) Set(name clientfeatures.Feature, enabled bool) error {
|
||||
return a.mfg.SetFromMap(map[string]bool{string(name): enabled})
|
||||
}
|
||||
|
||||
@@ -245,6 +245,10 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
|
||||
{Version: version.MustParse("1.32"), Default: true, PreRelease: featuregate.Beta},
|
||||
},
|
||||
|
||||
genericfeatures.CBORServingAndStorage: {
|
||||
{Version: version.MustParse("1.32"), Default: false, PreRelease: featuregate.Alpha},
|
||||
},
|
||||
|
||||
genericfeatures.ConcurrentWatchObjectDecode: {
|
||||
{Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Beta},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user