瀏覽代碼

Keep “kubernetes” in `docker context create kubernetes mycontext` UX. We cannot use “kubernetes” as an endpoint name, because the context Marshall/unmarshall has a specific logic for the “kubernetes” endpoint, so storing “kube”

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 年之前
父節點
當前提交
61a3f6faa5
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      api/context/store/store.go
  2. 1 1
      cli/cmd/context/create_kube.go

+ 1 - 1
api/context/store/store.go

@@ -57,7 +57,7 @@ const (
 	LocalContextType = "local"
 	// KubeContextType is the endpoint key in the context endpoints for a new
 	// kube backend
-	KubeContextType = "k8s"
+	KubeContextType = "kube"
 )
 
 const (

+ 1 - 1
cli/cmd/context/create_kube.go

@@ -41,7 +41,7 @@ $ docker context create k8s CONTEXT [flags]
 func createKubeCommand() *cobra.Command {
 	var opts kube.ContextParams
 	cmd := &cobra.Command{
-		Use:   "k8s CONTEXT [flags]",
+		Use:   "kubernetes CONTEXT [flags]",
 		Short: "Create context for a Kubernetes Cluster",
 		Args:  cobra.ExactArgs(1),
 		RunE: func(cmd *cobra.Command, args []string) error {