Skip to content

Commit

Permalink
Merge pull request #7934 from sharifelgamal/warn-exp
Browse files Browse the repository at this point in the history
add experimental warning for multinode clusters
  • Loading branch information
sharifelgamal authored May 1, 2020
2 parents 25ca347 + fa039b1 commit cc32892
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ __minikube_bash_source <(__minikube_convert_bash_to_zsh)
return nil
}

// GenerateBashCompletion generates the completion for the bash shell
// GenerateFishCompletion generates the completion for the bash shell
func GenerateFishCompletion(w io.Writer, cmd *cobra.Command) error {
_, err := w.Write([]byte(boilerPlate))
if err != nil {
Expand Down
7 changes: 5 additions & 2 deletions cmd/minikube/cmd/node_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ var nodeAddCmd = &cobra.Command{
}

// Make sure to decrease the default amount of memory we use per VM if this is the first worker node
if len(cc.Nodes) == 1 && viper.GetString(memory) == "" {
cc.Memory = 2200
if len(cc.Nodes) == 1 {
warnAboutMultiNode()
if viper.GetString(memory) == "" {
cc.Memory = 2200
}
}

if err := node.Add(cc, n); err != nil {
Expand Down
6 changes: 6 additions & 0 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ func startWithDriver(starter node.Starter, existing *config.ClusterConfig) (*kub
if driver.BareMetal(starter.Cfg.Driver) {
exit.WithCodeT(exit.Config, "The none driver is not compatible with multi-node clusters.")
} else {
out.Ln("")
warnAboutMultiNode()
for i := 1; i < numNodes; i++ {
nodeName := node.Name(i + 1)
n := config.Node{
Expand All @@ -305,6 +307,10 @@ func startWithDriver(starter node.Starter, existing *config.ClusterConfig) (*kub
return kubeconfig, nil
}

func warnAboutMultiNode() {
out.WarningT("Multi-node clusters are currently experimental and might exhibit unintended behavior.\nTo track progress on multi-node clusters, see https://github.com/kubernetes/minikube/issues/7538.")
}

func updateDriver(driverName string) {
v, err := version.GetSemverVersion()
if err != nil {
Expand Down

0 comments on commit cc32892

Please sign in to comment.