UPSTREAM: 74956: make delegating authorization use protobuf client
@@ -187,5 +187,10 @@ func (s *DelegatingAuthorizationOptions) getClient() (kubernetes.Interface, erro
clientConfig.QPS = 200
clientConfig.Burst = 400
- return kubernetes.NewForConfig(clientConfig)
+ // make the client use protobuf
+ protoConfig := rest.CopyConfig(clientConfig)
+ protoConfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
+ protoConfig.ContentType = "application/vnd.kubernetes.protobuf"
+
+ return kubernetes.NewForConfig(protoConfig)
}
