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-Source: 29eea3c
  • Loading branch information
mfojtik authored and sanchezl committed Dec 20, 2022
1 parent cf97824 commit 2678bba
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 2678bba

Please sign in to comment.