Merge pull request #475 from andyxning/enable_protobuf

prefer protobuf instead of just json format
This commit is contained in:
k8s-ci-robot 2018-06-25 00:17:01 -07:00 committed by GitHub
commit bdcb2eb490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -116,6 +116,9 @@ func createKubeClient(apiserver string, kubeconfig string) (clientset.Interface,
return nil, err
}
config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
config.ContentType = "application/vnd.kubernetes.protobuf"
kubeClient, err := clientset.NewForConfig(config)
if err != nil {
return nil, err