pull/21689/merge
Divy Singhvi 2025-11-13 21:56:57 +00:00 committed by GitHub
commit 752dd69d5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 24 additions and 10 deletions

View File

@ -314,7 +314,7 @@ func provisionWithDriver(cmd *cobra.Command, ds registry.DriverState, existing *
}
virtualBoxMacOS13PlusWarning(driverName)
hyperkitDeprecationWarning(driverName)
warnDriverDeprecated(driverName)
validateFlags(cmd, driverName)
validateUser(driverName)
if driverName == oci.Docker {
@ -419,17 +419,31 @@ func virtualBoxMacOS13PlusWarning(driverName string) {
`)
}
// hyperkitDeprecationWarning prints a deprecation warning for the hyperkit driver
func hyperkitDeprecationWarning(driverName string) {
if !driver.IsHyperKit(driverName) {
// warnDriverDeprecated prints a small deprecation warning if the selected driver is deprecated
func warnDriverDeprecated(driverName string) {
if driverName == "" {
return
}
out.WarningT(`The 'hyperkit' driver is deprecated and will be removed in a future release.
You can use alternative drivers such as 'vfkit', 'qemu', or 'docker'.
https://minikube.sigs.k8s.io/docs/drivers/vfkit/
https://minikube.sigs.k8s.io/docs/drivers/qemu/
https://minikube.sigs.k8s.io/docs/drivers/docker/
`)
for _, d := range registry.List() {
if d.Priority != registry.Deprecated {
continue
}
// match driver name
if d.Name == driverName {
out.WarningT("The '{{.name}}' driver is deprecated and will be removed in a future release.\n You can use alternative drivers: {{.drivers}}.", out.V{"name": d.Name, "drivers": strings.Join(driver.SupportedDrivers(), ", ")})
return
}
// match any alias
for _, a := range d.Alias {
if a == driverName {
out.WarningT("The '{{.name}}' driver is deprecated and will be removed in a future release.\n You can use alternative drivers: {{.drivers}}.", out.V{"name": d.Name, "drivers": strings.Join(driver.SupportedDrivers(), ", ")})
return
}
}
}
}
func validateBuiltImageVersion(r command.Runner, driverName string) {