Merge pull request #10556 from smarterclayton/remove_hardcoded_version

Do not hardcode version
This commit is contained in:
Zach Loafman 2015-06-30 13:53:35 -07:00
commit 686f5a3084

View File

@ -249,7 +249,7 @@ func InClusterConfig() (*Config, error) {
tlsClientConfig := TLSClientConfig{}
rootCAFile := "/var/run/secrets/kubernetes.io/serviceaccount/" + api.ServiceAccountRootCAKey
if _, err := util.CertPoolFromFile(rootCAFile); err != nil {
glog.Errorf("expected to load root ca config from %s, but got err: %v", rootCAFile, err)
glog.Errorf("expected to load root CA config from %s, but got err: %v", rootCAFile, err)
} else {
tlsClientConfig.CAFile = rootCAFile
}
@ -257,7 +257,6 @@ func InClusterConfig() (*Config, error) {
return &Config{
// TODO: switch to using cluster DNS.
Host: "https://" + net.JoinHostPort(os.Getenv("KUBERNETES_SERVICE_HOST"), os.Getenv("KUBERNETES_SERVICE_PORT")),
Version: "v1beta3",
BearerToken: string(token),
TLSClientConfig: tlsClientConfig,
}, nil