Add message to discourage the use of virtualbox driver
parent
4c66799127
commit
0e665930e8
|
@ -126,6 +126,10 @@ var settings = []Setting{
|
||||||
name: config.WantNoneDriverWarning,
|
name: config.WantNoneDriverWarning,
|
||||||
set: SetBool,
|
set: SetBool,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: config.WantVirtualBoxDriverWarning,
|
||||||
|
set: SetBool,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: config.ProfileName,
|
name: config.ProfileName,
|
||||||
set: SetString,
|
set: SetString,
|
||||||
|
|
|
@ -305,6 +305,7 @@ func setupViper() {
|
||||||
viper.SetDefault(config.WantUpdateNotification, true)
|
viper.SetDefault(config.WantUpdateNotification, true)
|
||||||
viper.SetDefault(config.ReminderWaitPeriodInHours, 24)
|
viper.SetDefault(config.ReminderWaitPeriodInHours, 24)
|
||||||
viper.SetDefault(config.WantNoneDriverWarning, true)
|
viper.SetDefault(config.WantNoneDriverWarning, true)
|
||||||
|
viper.SetDefault(config.WantVirtualBoxDriverWarning, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func addToPath(dir string) {
|
func addToPath(dir string) {
|
||||||
|
|
|
@ -38,6 +38,8 @@ const (
|
||||||
ReminderWaitPeriodInHours = "ReminderWaitPeriodInHours"
|
ReminderWaitPeriodInHours = "ReminderWaitPeriodInHours"
|
||||||
// WantNoneDriverWarning is the key for WantNoneDriverWarning
|
// WantNoneDriverWarning is the key for WantNoneDriverWarning
|
||||||
WantNoneDriverWarning = "WantNoneDriverWarning"
|
WantNoneDriverWarning = "WantNoneDriverWarning"
|
||||||
|
// WantVirtualBoxDriverWarning is the key for WantVirtualBoxDriverWarning
|
||||||
|
WantVirtualBoxDriverWarning = "WantVirtualBoxDriverWarning"
|
||||||
// ProfileName represents the key for the global profile parameter
|
// ProfileName represents the key for the global profile parameter
|
||||||
ProfileName = "profile"
|
ProfileName = "profile"
|
||||||
// UserFlag is the key for the global user flag (ex. --user=user1)
|
// UserFlag is the key for the global user flag (ex. --user=user1)
|
||||||
|
|
|
@ -191,6 +191,23 @@ func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) {
|
||||||
go addons.Start(&wg, starter.Cfg, starter.ExistingAddons, addonList)
|
go addons.Start(&wg, starter.Cfg, starter.ExistingAddons, addonList)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// discourage use of the virtualbox driver
|
||||||
|
if starter.Cfg.Driver == driver.VirtualBox && viper.GetBool(config.WantVirtualBoxDriverWarning) {
|
||||||
|
var altDriverList strings.Builder
|
||||||
|
for _, d := range driver.Choices(true) {
|
||||||
|
if d.Name != "virtualbox" {
|
||||||
|
altDriverList.WriteString(fmt.Sprintf("\t- %s\n", d.Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
out.ErrT(style.Empty, "")
|
||||||
|
out.WarningT("The 'virtualbox' driver could be troublesome to work with, do not use if you aren't familiar with it")
|
||||||
|
out.ErrT(style.Tip, "You could instead use one of the drivers listed below:")
|
||||||
|
out.ErrT(style.Empty, altDriverList.String())
|
||||||
|
out.ErrT(style.Documentation, "For more information, see: https://minikube.sigs.k8s.io/docs/reference/drivers/virtualbox/")
|
||||||
|
out.ErrT(style.Empty, "")
|
||||||
|
}
|
||||||
|
|
||||||
if apiServer {
|
if apiServer {
|
||||||
// special ops for none , like change minikube directory.
|
// special ops for none , like change minikube directory.
|
||||||
// multinode super doesn't work on the none driver
|
// multinode super doesn't work on the none driver
|
||||||
|
|
|
@ -30,6 +30,7 @@ Configurable fields:
|
||||||
* WantBetaUpdateNotification
|
* WantBetaUpdateNotification
|
||||||
* ReminderWaitPeriodInHours
|
* ReminderWaitPeriodInHours
|
||||||
* WantNoneDriverWarning
|
* WantNoneDriverWarning
|
||||||
|
* WantVirtualBoxDriverWarning
|
||||||
* profile
|
* profile
|
||||||
* bootstrapper
|
* bootstrapper
|
||||||
* insecure-registry
|
* insecure-registry
|
||||||
|
|
Loading…
Reference in New Issue