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) virtualBoxMacOS13PlusWarning(driverName)
hyperkitDeprecationWarning(driverName) warnDriverDeprecated(driverName)
validateFlags(cmd, driverName) validateFlags(cmd, driverName)
validateUser(driverName) validateUser(driverName)
if driverName == oci.Docker { if driverName == oci.Docker {
@ -419,17 +419,31 @@ func virtualBoxMacOS13PlusWarning(driverName string) {
`) `)
} }
// hyperkitDeprecationWarning prints a deprecation warning for the hyperkit driver // warnDriverDeprecated prints a small deprecation warning if the selected driver is deprecated
func hyperkitDeprecationWarning(driverName string) { func warnDriverDeprecated(driverName string) {
if !driver.IsHyperKit(driverName) { if driverName == "" {
return 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'. for _, d := range registry.List() {
https://minikube.sigs.k8s.io/docs/drivers/vfkit/ if d.Priority != registry.Deprecated {
https://minikube.sigs.k8s.io/docs/drivers/qemu/ continue
https://minikube.sigs.k8s.io/docs/drivers/docker/ }
`)
// 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) { func validateBuiltImageVersion(r command.Runner, driverName string) {