forked from github/multus-cni
Changes configuration for kube api to use gRPC
This commit is contained in:
@@ -482,6 +482,10 @@ func GetK8sClient(kubeconfig string, kubeClient KubeClient) (KubeClient, error)
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Specify that we use gRPC
|
||||||
|
config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
|
||||||
|
config.ContentType = "application/vnd.kubernetes.protobuf"
|
||||||
|
|
||||||
// creates the clientset
|
// creates the clientset
|
||||||
client, err := kubernetes.NewForConfig(config)
|
client, err := kubernetes.NewForConfig(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user