Skip to content

Commit

Permalink
scheduler: use protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Oct 24, 2024
1 parent d62988f commit 26df186
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/kube-scheduler/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,15 @@ func createKubeConfig(config componentbaseconfig.ClientConnectionConfiguration,

// createClients creates a kube client and an event client from the given kubeConfig
func createClients(kubeConfig *restclient.Config) (clientset.Interface, clientset.Interface, error) {
client, err := clientset.NewForConfig(restclient.AddUserAgent(kubeConfig, "scheduler"))
protobufConfig := restclient.CopyConfig(kubeConfig)
protobufConfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
protobufConfig.ContentType = "application/vnd.kubernetes.protobuf"
client, err := clientset.NewForConfig(restclient.AddUserAgent(protobufConfig, "scheduler"))
if err != nil {
return nil, nil, err
}

eventClient, err := clientset.NewForConfig(kubeConfig)
eventClient, err := clientset.NewForConfig(protobufConfig)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit 26df186

Please sign in to comment.