Skip to content

Commit

Permalink
persist whether install-addons was true or false
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhbapna committed Feb 14, 2023
1 parent 2d7df77 commit 0f334db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}

var existingAddons map[string]bool
if viper.GetBool(installAddons) {
cc.InstallAddons = viper.GetBool(installAddons)
if cc.InstallAddons {
existingAddons = map[string]bool{}
if existing != nil && existing.Addons != nil {
existingAddons = existing.Addons
Expand Down
2 changes: 2 additions & 0 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func (a *Addon) IsEnabled(cc *config.ClusterConfig) bool {
status, ok := cc.Addons[a.Name()]
if ok {
return status
} else if !cc.InstallAddons {
return false
}

// Return the default unconfigured state of the addon
Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ type ClusterConfig struct {
SSHPort int // Only used by ssh driver
KubernetesConfig KubernetesConfig
Nodes []Node
InstallAddons bool // used by install-addon flag
Addons map[string]bool
CustomAddonImages map[string]string // Maps image names to the image to use for addons. e.g. Dashboard -> k8s.gcr.io/echoserver:1.4 makes dashboard addon use echoserver for its Dashboard deployment.
CustomAddonRegistries map[string]string // Maps image names to the registry to use for addons. See CustomAddonImages for example.
Expand Down

0 comments on commit 0f334db

Please sign in to comment.