Skip to content

Commit

Permalink
Merge pull request #6696 from priyawadhwa/install-addons
Browse files Browse the repository at this point in the history
Fix bug in --install-addons flag
  • Loading branch information
medyagh authored Feb 20, 2020
2 parents a5c76f8 + 5ad4d6e commit 0af5734
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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

0 comments on commit 0af5734

Please sign in to comment.