Skip to content

Commit a3bd1db

Browse files
mfojtikbertinatto
authored andcommitted
UPSTREAM: 74956: apiserver: switch authorization to use protobuf client
OpenShift-Rebase-Source: 29eea3c
1 parent 36d1ad8 commit a3bd1db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

staging/src/k8s.io/apiserver/pkg/server/options/authorization.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -239,5 +239,10 @@ func (s *DelegatingAuthorizationOptions) getClient() (kubernetes.Interface, erro
239239
clientConfig.Wrap(s.CustomRoundTripperFn)
240240
}
241241

242-
return kubernetes.NewForConfig(clientConfig)
242+
// make the client use protobuf
243+
protoConfig := rest.CopyConfig(clientConfig)
244+
protoConfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
245+
protoConfig.ContentType = "application/vnd.kubernetes.protobuf"
246+
247+
return kubernetes.NewForConfig(protoConfig)
243248
}

0 commit comments

Comments
 (0)