Skip to content

Commit

Permalink
Merge pull request kubernetes#6114 from linxiulei/cmd
Browse files Browse the repository at this point in the history
Allow setting content-type in command
  • Loading branch information
k8s-ci-robot authored Sep 19, 2023
2 parents fa8a351 + 61d784a commit f9a7c7f
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 f9a7c7f

Please sign in to comment.