Skip to content

Commit

Permalink
Merge pull request #850 from wojtek-t/cherrypick_1_7_protobufs
Browse files Browse the repository at this point in the history
 Cherrypick to 1.7 branch: Use protobufs for communication with apiserver
  • Loading branch information
k8s-ci-robot committed Sep 26, 2019
2 parents 3cb2384 + cb190fc commit 9df6344
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/glbc/app/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9df6344

Please sign in to comment.