Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in --install-addons flag #6696

Merged
merged 1 commit into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,12 @@ func runStart(cmd *cobra.Command, args []string) {
ssh.SetDefaultClient(ssh.External)
}

existingAddons := map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
var existingAddons map[string]bool
if viper.GetBool(installAddons) {
existingAddons = map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
}
}
kubeconfig, err := node.Start(mc, n, true, existingAddons)
if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions pkg/minikube/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ func Start(mc config.MachineConfig, n config.Node, primary bool, existingAddons
configureMounts()

// enable addons, both old and new!
ea := map[string]bool{}
if existingAddons != nil {
ea = existingAddons
addons.Start(viper.GetString(config.MachineProfile), existingAddons, AddonList)
}
addons.Start(viper.GetString(config.MachineProfile), ea, AddonList)

if err = CacheAndLoadImagesInConfig(); err != nil {
out.T(out.FailureType, "Unable to load cached images from config file.")
Expand Down