diff --git a/cli/command/cli.go b/cli/command/cli.go index 0f369f901b..161163e00b 100644 --- a/cli/command/cli.go +++ b/cli/command/cli.go @@ -14,7 +14,7 @@ import ( "github.com/docker/cli/cli/config/configfile" dcontext "github.com/docker/cli/cli/context" "github.com/docker/cli/cli/context/docker" - kubcontext "github.com/docker/cli/cli/context/kubernetes" + kubecontext "github.com/docker/cli/cli/context/kubernetes" "github.com/docker/cli/cli/context/store" "github.com/docker/cli/cli/debug" cliflags "github.com/docker/cli/cli/flags" @@ -530,6 +530,6 @@ func defaultContextStoreConfig() store.Config { return store.NewConfig( func() interface{} { return &DockerContext{} }, store.EndpointTypeGetter(docker.DockerEndpoint, func() interface{} { return &docker.EndpointMeta{} }), - store.EndpointTypeGetter(kubcontext.KubernetesEndpoint, func() interface{} { return &kubcontext.EndpointMeta{} }), + store.EndpointTypeGetter(kubecontext.KubernetesEndpoint, func() interface{} { return &kubecontext.EndpointMeta{} }), ) } diff --git a/cli/command/system/version.go b/cli/command/system/version.go index 2e2ae2ee3a..62170ca06d 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -15,6 +15,7 @@ import ( "github.com/docker/cli/cli/version" "github.com/docker/cli/kubernetes" "github.com/docker/cli/templates" + kubeapi "github.com/docker/compose-on-kubernetes/api" "github.com/docker/docker/api/types" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -243,7 +244,7 @@ func getKubernetesVersion(dockerCli command.Cli, kubeConfig string) *kubernetesV err error ) if dockerCli.CurrentContext() == "" { - clientConfig = kubernetes.NewKubernetesConfig(kubeConfig) + clientConfig = kubeapi.NewKubernetesConfig(kubeConfig) } else { clientConfig, err = kubecontext.ConfigFromContext(dockerCli.CurrentContext(), dockerCli.ContextStore()) } diff --git a/cli/context/kubernetes/load.go b/cli/context/kubernetes/load.go index 97dded9b42..c218d94dee 100644 --- a/cli/context/kubernetes/load.go +++ b/cli/context/kubernetes/load.go @@ -3,7 +3,7 @@ package kubernetes import ( "github.com/docker/cli/cli/context" "github.com/docker/cli/cli/context/store" - "github.com/docker/cli/kubernetes" + api "github.com/docker/compose-on-kubernetes/api" "k8s.io/client-go/tools/clientcmd" clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) @@ -91,5 +91,5 @@ func ConfigFromContext(name string, s store.Reader) (clientcmd.ClientConfig, err return ep.KubernetesConfig(), nil } // context has no kubernetes endpoint - return kubernetes.NewKubernetesConfig(""), nil + return api.NewKubernetesConfig(""), nil } diff --git a/kubernetes/config.go b/kubernetes/config.go deleted file mode 100644 index 8ec85c2195..0000000000 --- a/kubernetes/config.go +++ /dev/null @@ -1,8 +0,0 @@ -package kubernetes - -import api "github.com/docker/compose-on-kubernetes/api" - -// NewKubernetesConfig resolves the path to the desired Kubernetes configuration file based on -// the KUBECONFIG environment variable and command line flags. -// Deprecated: Use github.com/docker/compose-on-kubernetes/api.NewKubernetesConfig instead -var NewKubernetesConfig = api.NewKubernetesConfig