Skip to content

Commit

Permalink
UPSTREAM: 74956: apiserver: switch authorization to use protobuf client
Browse files Browse the repository at this point in the history
openshift-rebase(v1.24):source=bb9c3262208
  • Loading branch information
mfojtik authored and soltysh committed Aug 18, 2022
1 parent d8dfd68 commit f560def
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,10 @@ func (s *DelegatingAuthorizationOptions) getClient() (kubernetes.Interface, erro
clientConfig.Wrap(s.CustomRoundTripperFn)
}

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)
}

0 comments on commit f560def

Please sign in to comment.