-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
add experimental warning for multinode clusters #7934
Changes from 3 commits
d09ae65
a2aaea8
965e8da
5914fb2
fa039b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unrelated - can it be moved to a second PR for release notes-sake? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the memory check already existed, I just moved a little of the logic around to make it more clear |
||
} | ||
} | ||
|
||
if err := node.Add(cc, n); err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the only part of the code we could detect it is multi node?
I think I saw somewhere else too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only time we care about warning the user is when they are starting a multinode cluster, so just
minikube start
or the firstminikube node add
which is what this is detectingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this condition " len(cc.Nodes) == 1 && viper.GetString(memory) == ""
would detect both
minikube node add
and also
minikube start -n=3?
wouldn;t the len(cc.Nodes) be 3 in that case and not trigger this if?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right that we shouldn't put the check inside this if because of the memory check. there'a separate call to
warnAboutMultiNode()
that will detect theminikube start -n 3
case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this check. the other check is in
start.go