Merge pull request #7934 from sharifelgamal/warn-exp

add experimental warning for multinode clusters
pull/7971/head
Sharif Elgamal 2020-05-01 12:33:58 -07:00 committed by GitHub
commit cc32892bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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{
@ -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 {