mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-04 00:24:59 +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. Kubernetes-commit: 072dfcb416fd4e1ddab0a89ac4faf519e268bc96
This commit is contained in:
committed by
Kubernetes Publisher
parent
c1010ffd7d
commit
8cb21671f4
@@ -49,9 +49,9 @@ func ConfigFor(inConfig *rest.Config) *rest.Config {
|
||||
|
||||
config.ContentType = "application/json"
|
||||
config.AcceptContentTypes = "application/json"
|
||||
if features.TestOnlyFeatureGates.Enabled(features.TestOnlyClientAllowsCBOR) {
|
||||
if features.FeatureGates().Enabled(features.ClientsAllowCBOR) {
|
||||
config.AcceptContentTypes = "application/json;q=0.9,application/cbor;q=1"
|
||||
if features.TestOnlyFeatureGates.Enabled(features.TestOnlyClientPrefersCBOR) {
|
||||
if features.FeatureGates().Enabled(features.ClientsPreferCBOR) {
|
||||
config.ContentType = "application/cbor"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user