-
Notifications
You must be signed in to change notification settings - Fork 5k
Don't require both --mount for using --mount-string and remove default mount-string #21250
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
Changes from all commits
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 |
---|---|---|
|
@@ -173,8 +173,8 @@ func initMinikubeFlags() { | |
startCmd.Flags().Bool(keepContext, false, "This will keep the existing kubectl context and will create a minikube context.") | ||
startCmd.Flags().Bool(embedCerts, false, "if true, will embed the certs in kubeconfig.") | ||
startCmd.Flags().StringP(containerRuntime, "c", constants.DefaultContainerRuntime, fmt.Sprintf("The container runtime to be used. Valid options: %s (default: auto)", strings.Join(cruntime.ValidRuntimes(), ", "))) | ||
startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube.") | ||
startCmd.Flags().String(mountString, constants.DefaultMountDir+":/minikube-host", "The argument to pass the minikube mount command on start.") | ||
startCmd.Flags().Bool(createMount, false, "Kept for backward compatibility, value is ignored.") | ||
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. help text, this will be depricated and merged with --mount-string in the next version 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. Opened #21291, I'll try to get this into 1.37. |
||
startCmd.Flags().String(mountString, "", "Directory to mount in the guest using format '/host-path:/guest-path'.") | ||
startCmd.Flags().String(mount9PVersion, defaultMount9PVersion, mount9PVersionDescription) | ||
startCmd.Flags().String(mountGID, defaultMountGID, mountGIDDescription) | ||
startCmd.Flags().String(mountIPFlag, defaultMountIP, mountIPDescription) | ||
|
@@ -614,7 +614,6 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str | |
SSHPort: viper.GetInt(sshSSHPort), | ||
ExtraDisks: viper.GetInt(extraDisks), | ||
CertExpiration: viper.GetDuration(certExpiration), | ||
Mount: viper.GetBool(createMount), | ||
MountString: viper.GetString(mountString), | ||
Mount9PVersion: viper.GetString(mount9PVersion), | ||
MountGID: viper.GetString(mountGID), | ||
|
@@ -655,7 +654,8 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, rtime str | |
AutoPauseInterval: viper.GetDuration(autoPauseInterval), | ||
} | ||
cc.VerifyComponents = interpretWaitFlag(*cmd) | ||
if viper.GetBool(createMount) && driver.IsKIC(drvName) { | ||
|
||
if viper.GetString(mountString) != "" && driver.IsKIC(drvName) { | ||
cc.ContainerVolumeMounts = []string{viper.GetString(mountString)} | ||
} | ||
|
||
|
@@ -867,7 +867,6 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC | |
updateStringFromFlag(cmd, &cc.KubernetesConfig.ServiceCIDR, serviceCIDR) | ||
updateBoolFromFlag(cmd, &cc.KubernetesConfig.ShouldLoadCachedImages, cacheImages) | ||
updateDurationFromFlag(cmd, &cc.CertExpiration, certExpiration) | ||
updateBoolFromFlag(cmd, &cc.Mount, createMount) | ||
updateStringFromFlag(cmd, &cc.MountString, mountString) | ||
updateStringFromFlag(cmd, &cc.Mount9PVersion, mount9PVersion) | ||
updateStringFromFlag(cmd, &cc.MountGID, mountGID) | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
we can consider hiding this flag (we have a few flags that hidden since we dont want ppl to use them, but left for backward campatiblitiy
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.
Hiding the flag will hide the useful help message. I think we should keep if for now. If we don't use it in the next releases we can hide it.