From bff260d920852931039b4c7b3c057bbdd7b96f78 Mon Sep 17 00:00:00 2001 From: Josh Branham Date: Thu, 13 Dec 2018 21:34:28 -0800 Subject: [PATCH 1/2] Print --name if env NAME unset --- cmd/kops/create_cluster.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index 04f0db29d1b35..078444c01bfd5 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -1292,7 +1292,13 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e fmt.Fprintf(&sb, " * edit your master instance group: kops edit ig --name=%s %s\n", clusterName, masters[0].ObjectMeta.Name) } fmt.Fprintf(&sb, "\n") - fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster %s --yes\n", clusterName) + ok := os.LookupEnv(NAME) + if !ok { + fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster --name %s --yes\n", clusterName) + } else { + fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster --yes\n") + } + } fmt.Fprintf(&sb, "\n") _, err := out.Write(sb.Bytes()) From 85bfa15b3621563dd448528e0236aec117535b18 Mon Sep 17 00:00:00 2001 From: Josh Branham Date: Thu, 13 Dec 2018 21:46:46 -0800 Subject: [PATCH 2/2] Simplify --- cmd/kops/create_cluster.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index 078444c01bfd5..9f2f640de74e3 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -1292,13 +1292,7 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e fmt.Fprintf(&sb, " * edit your master instance group: kops edit ig --name=%s %s\n", clusterName, masters[0].ObjectMeta.Name) } fmt.Fprintf(&sb, "\n") - ok := os.LookupEnv(NAME) - if !ok { - fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster --name %s --yes\n", clusterName) - } else { - fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster --yes\n") - } - } + fmt.Fprintf(&sb, "Finally configure your cluster with: kops update cluster --name %s --yes\n", clusterName) fmt.Fprintf(&sb, "\n") _, err := out.Write(sb.Bytes())