Skip to content

Commit 29eea3c

Browse files
mfojtiksoltysh
authored andcommitted
UPSTREAM: 74956: apiserver: switch authorization to use protobuf client
openshift-rebase(v1.24):source=bb9c3262208
1 parent 9cb46d8 commit 29eea3c

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,10 @@ func (s *DelegatingAuthorizationOptions) getClient() (kubernetes.Interface, erro
240240
clientConfig.Wrap(s.CustomRoundTripperFn)
241241
}
242242

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

0 commit comments

Comments
 (0)