From cb190fcbbac5fbafb9e9b34ffe17544456ab6a92 Mon Sep 17 00:00:00 2001 From: wojtekt Date: Wed, 11 Sep 2019 13:57:04 +0200 Subject: [PATCH] Use protobufs for communication with apiserver --- cmd/glbc/app/clients.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/glbc/app/clients.go b/cmd/glbc/app/clients.go index 6e36dffdac..4940d9108d 100644 --- a/cmd/glbc/app/clients.go +++ b/cmd/glbc/app/clients.go @@ -46,6 +46,16 @@ const ( // NewKubeConfig returns a Kubernetes client config given the command line settings. func NewKubeConfig() (*rest.Config, error) { + config, err := newKubeConfig() + if err != nil { + return nil, err + } + // Use protobufs for communication with apiserver + config.ContentType = "application/vnd.kubernetes.protobuf" + return config, nil +} + +func newKubeConfig() (*rest.Config, error) { if flags.F.InCluster { klog.V(0).Infof("Using in cluster configuration") return rest.InClusterConfig()