mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #1893 from crhym3/fix-1149-req-body
Replace custom ProxyServer (kubecfg/kubectl -proxy) with httputil.ReverseProxy
This commit is contained in:
@@ -138,7 +138,7 @@ func getFlagInt(cmd *cobra.Command, flag string) int {
|
||||
return v
|
||||
}
|
||||
|
||||
func getKubeClient(cmd *cobra.Command) *client.Client {
|
||||
func getKubeConfig(cmd *cobra.Command) *client.Config {
|
||||
config := &client.Config{}
|
||||
|
||||
var host string
|
||||
@@ -184,6 +184,12 @@ func getKubeClient(cmd *cobra.Command) *client.Client {
|
||||
// The API version (e.g. v1beta1), not the binary version.
|
||||
config.Version = getFlagString(cmd, "api-version")
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
func getKubeClient(cmd *cobra.Command) *client.Client {
|
||||
config := getKubeConfig(cmd)
|
||||
|
||||
// The binary version.
|
||||
matchVersion := getFlagBool(cmd, "match-server-version")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user