Print --name if env NAME unset

This commit is contained in:
Josh Branham 2018-12-13 21:34:28 -08:00
parent 4806708c3b
commit bff260d920
1 changed files with 7 additions and 1 deletions

View File

@ -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())