Skip to content

Commit

Permalink
Allow setting content-type in command
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Lin <[email protected]>
  • Loading branch information
linxiulei committed Sep 19, 2023
1 parent 1a6b1e9 commit 61d784a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cluster-autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ var (
address = flag.String("address", ":8085", "The address to expose prometheus metrics.")
kubernetes = flag.String("kubernetes", "", "Kubernetes master location. Leave blank for default")
kubeConfigFile = flag.String("kubeconfig", "", "Path to kubeconfig file with authorization and master location information.")
kubeAPIContentType = flag.String("kube-api-content-type", "application/vnd.kubernetes.protobuf", "Content type of requests sent to apiserver.")
kubeClientBurst = flag.Int("kube-client-burst", rest.DefaultBurst, "Burst value for kubernetes client.")
kubeClientQPS = flag.Float64("kube-client-qps", float64(rest.DefaultQPS), "QPS value for kubernetes client.")
cloudConfig = flag.String("cloud-config", "", "The path to the cloud provider configuration file. Empty string for no configuration file.")
Expand Down Expand Up @@ -408,6 +409,8 @@ func getKubeConfig() *rest.Config {
klog.Fatalf("Failed to build Kubernetes client configuration: %v", err)
}

kubeConfig.ContentType = *kubeAPIContentType

return kubeConfig
}

Expand Down

0 comments on commit 61d784a

Please sign in to comment.