-
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 deprecation notices for kvm and xhyve. #2227
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ import ( | |
"github.com/docker/machine/libmachine/state" | ||
"github.com/golang/glog" | ||
"github.com/pkg/errors" | ||
"github.com/spf13/viper" | ||
|
||
cfg "k8s.io/minikube/pkg/minikube/config" | ||
"k8s.io/minikube/pkg/minikube/constants" | ||
|
@@ -206,9 +207,23 @@ func createHost(api libmachine.API, config MachineConfig) (*host.Host, error) { | |
driver = createVirtualboxHost(config) | ||
case "vmwarefusion": | ||
driver = createVMwareFusionHost(config) | ||
case "kvm", "kvm2": | ||
case "kvm": | ||
if viper.GetBool(cfg.ShowDriverDeprecationNotification) { | ||
fmt.Fprintln(os.Stderr, `WARNING: The kvm driver is now deprecated and support for it will be removed in a future release. | ||
Please consider switching to the kvm2 driver, which is intended to replace the kvm driver. | ||
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver for more information. | ||
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. I do not see a topic in the docs related to 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. Nice catch. We'll get that in today too. |
||
To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`) | ||
} | ||
driver = createKVMHost(config) | ||
case "kvm2": | ||
driver = createKVMHost(config) | ||
case "xhyve": | ||
if viper.GetBool(cfg.ShowDriverDeprecationNotification) { | ||
fmt.Fprintln(os.Stderr, `WARNING: The xhyve driver is now deprecated and support for it will be removed in a future release. | ||
Please consider switching to the hyperkit driver, which is intended to replace the xhyve driver. | ||
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver for more information. | ||
To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`) | ||
} | ||
driver = createXhyveHost(config) | ||
case "hyperv": | ||
driver = createHypervHost(config) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It may be good to allow a user to suppress these messages so we don't break any automated scripts? I think that was an issue with some of the other warning messages we've added. We might be able to reuse one of our env vars or config values for it.
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.
Done.