UPSTREAM: 62469: stop defaulting kubeconfig to
@@ -36,7 +36,7 @@ import (
var (
// ClusterDefaults has the same behavior as the old EnvVar and DefaultCluster fields
// DEPRECATED will be replaced
- ClusterDefaults = clientcmdapi.Cluster{Server: getDefaultServer()}
+ ClusterDefaults = clientcmdapi.Cluster{Server: os.Getenv("KUBERNETES_MASTER")}
// DefaultClientConfig represents the legacy behavior of this package for defaulting
// DEPRECATED will be replace
DefaultClientConfig = DirectClientConfig{*clientcmdapi.NewConfig(), "", &ConfigOverrides{
@@ -44,15 +44,6 @@ var (
}, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}}
)
-// getDefaultServer returns a default setting for DefaultClientConfig
-// DEPRECATED
-func getDefaultServer() string {
- if server := os.Getenv("KUBERNETES_MASTER"); len(server) > 0 {
- return server
- }
- return "http://localhost:8080"
-}
-
// ClientConfig is used to make it easy to get an api server client
type ClientConfig interface {
// RawConfig returns the merged result of all overrides
