mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Implement streaming proto encoding
This commit is contained in:
@@ -694,9 +694,13 @@ const (
|
||||
StorageVersionMigrator featuregate.Feature = "StorageVersionMigrator"
|
||||
|
||||
// owner: @serathius
|
||||
// Allow API server to encode collections item by item, instead of all at once.
|
||||
// Allow API server JSON encoder to encode collections item by item, instead of all at once.
|
||||
StreamingCollectionEncodingToJSON featuregate.Feature = "StreamingCollectionEncodingToJSON"
|
||||
|
||||
// owner: serathius
|
||||
// Allow API server Protobuf encoder to encode collections item by item, instead of all at once.
|
||||
StreamingCollectionEncodingToProtobuf featuregate.Feature = "StreamingCollectionEncodingToProtobuf"
|
||||
|
||||
// owner: @robscott
|
||||
// kep: https://kep.k8s.io/2433
|
||||
//
|
||||
|
||||
@@ -763,6 +763,10 @@ var defaultVersionedKubernetesFeatureGates = map[featuregate.Feature]featuregate
|
||||
{Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta},
|
||||
},
|
||||
|
||||
StreamingCollectionEncodingToProtobuf: {
|
||||
{Version: version.MustParse("1.33"), Default: true, PreRelease: featuregate.Beta},
|
||||
},
|
||||
|
||||
SupplementalGroupsPolicy: {
|
||||
{Version: version.MustParse("1.31"), Default: false, PreRelease: featuregate.Alpha},
|
||||
},
|
||||
|
||||
@@ -80,6 +80,9 @@ func (c *GenericConfig) NewRESTStorage(apiResourceConfigSource serverstorage.API
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.StreamingCollectionEncodingToJSON) {
|
||||
opts = append(opts, serializer.WithStreamingCollectionEncodingToJSON())
|
||||
}
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.StreamingCollectionEncodingToProtobuf) {
|
||||
opts = append(opts, serializer.WithStreamingCollectionEncodingToProtobuf())
|
||||
}
|
||||
if len(opts) != 0 {
|
||||
apiGroupInfo.NegotiatedSerializer = serializer.NewCodecFactory(legacyscheme.Scheme, opts...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user