Commit 5d89dda9 authored by Chao Xu's avatar Chao Xu

respect --api-version in the output of "kubectl cluster-info"

parent dd61c206
...@@ -23,7 +23,6 @@ import ( ...@@ -23,7 +23,6 @@ import (
"strconv" "strconv"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest"
cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util" cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource" "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource"
...@@ -83,7 +82,7 @@ func RunClusterInfo(factory *cmdutil.Factory, out io.Writer, cmd *cobra.Command) ...@@ -83,7 +82,7 @@ func RunClusterInfo(factory *cmdutil.Factory, out io.Writer, cmd *cobra.Command)
link += "http://" + ip + ":" + strconv.Itoa(port.Port) + " " link += "http://" + ip + ":" + strconv.Itoa(port.Port) + " "
} }
} else { } else {
link = client.Host + "/api/" + latest.Version + "/proxy/namespaces/" + service.ObjectMeta.Namespace + "/services/" + service.ObjectMeta.Name link = client.Host + "/api/" + client.Version + "/proxy/namespaces/" + service.ObjectMeta.Namespace + "/services/" + service.ObjectMeta.Name
} }
name := service.ObjectMeta.Labels["kubernetes.io/name"] name := service.ObjectMeta.Labels["kubernetes.io/name"]
if len(name) == 0 { if len(name) == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment