Skip to content

Commit

Permalink
Improve text strings for existing VM's and setting cluster permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Feb 12, 2019
1 parent 452054b commit 0a5b64e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,7 @@ func startHost(api libmachine.API, mc cfg.MachineConfig) (*host.Host, bool) {
prepareNone()
} else {
if exists {
if cfg.GetMachineName() == constants.DefaultMachineName {
console.OutStyle("tip", "Tip: To create another VM, use 'minikube start -p <new name>' or use 'minikube delete' to delete this one.")
}
console.OutStyle("waiting", "Waiting for existing %q VM to start ...", cfg.GetMachineName())
console.OutStyle("waiting", "Spinning up existing VM for %q ...", cfg.GetMachineName())
} else {
console.OutStyle("starting-vm", "Creating %s VM (CPUs=%d, Memory=%dMB, Disk=%dMB) ...", mc.VMDriver, mc.CPUs, mc.Memory, mc.DiskSize)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (k *KubeadmBootstrapper) StartCluster(k8s config.KubernetesConfig) error {
}

// NOTE: We have not yet asserted that we can access the apiserver. Now would be a great time to do so.
console.OutStyle("permissions", "Setting up cluster admin privileges ...")
console.OutStyle("permissions", "Configuring cluster permissions ...")
if err := util.RetryAfter(100, elevateKubeSystemPrivileges, time.Millisecond*500); err != nil {
return errors.Wrap(err, "timed out waiting to elevate kube-system RBAC privileges")
}
Expand Down
10 changes: 7 additions & 3 deletions pkg/minikube/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ func StartHost(api libmachine.API, config cfg.MachineConfig) (*host.Host, error)
}

if h.Driver.DriverName() != config.VMDriver {
console.Warning("Ignoring --vm-driver=%s, as the %q host was created using the %s driver.",
console.Out("\n")
console.Warning("Ignoring --vm-driver=%s, as the existing %q VM was created using the %s driver.",
config.VMDriver, cfg.GetMachineName(), h.Driver.DriverName())
console.Warning("To change drivers, create a new host using `minikube start -p <name>` or run `minikube delete -p %s`",
h.Driver.DriverName(), cfg.GetMachineName())
console.Warning("To switch drivers, you may create a new VM using `minikube start -p <name> --vm-driver=%s`", config.VMDriver)
console.Warning("Alternatively, you may delete the existing VM using `minikube delete -p %s`", cfg.GetMachineName())
console.Out("\n")
} else if exists && cfg.GetMachineName() == constants.DefaultMachineName {
console.OutStyle("tip", "Tip: To create a new cluster, use 'minikube start -p <new name>' or use 'minikube delete' to delete this one.")
}

s, err := h.Driver.GetState()
Expand Down

0 comments on commit 0a5b64e

Please sign in to comment.