From 3459f205eda7e7593d80f019bb52043f3f22a45b Mon Sep 17 00:00:00 2001 From: Christopher Hoskin Date: Tue, 19 Oct 2021 15:23:31 +0100 Subject: [PATCH] Accept an array of --mountstrings --- cmd/minikube/cmd/start_flags.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index a86ad5b9bfcb..d0003389d561 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -161,7 +161,7 @@ func initMinikubeFlags() { startCmd.Flags().Bool(embedCerts, false, "if true, will embed the certs in kubeconfig.") startCmd.Flags().String(containerRuntime, constants.DefaultContainerRuntime, fmt.Sprintf("The container runtime to be used (%s).", 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().StringArray(mountString, []string{constants.DefaultMountDir + ":/minikube-host"}, "The argument to pass the minikube mount command on start.") startCmd.Flags().String(mount9PVersion, defaultMount9PVersion, mount9PVersionDescription) startCmd.Flags().String(mountGID, defaultMountGID, mountGIDDescription) startCmd.Flags().String(mountIPFlag, defaultMountIP, mountIPDescription) @@ -171,6 +171,7 @@ func initMinikubeFlags() { startCmd.Flags().Uint16(mountPortFlag, defaultMountPort, mountPortDescription) startCmd.Flags().String(mountTypeFlag, defaultMountType, mountTypeDescription) startCmd.Flags().String(mountUID, defaultMountUID, mountUIDDescription) + startCmd.Flags().StringSlice(config.AddonListFlag, nil, "Enable addons. see `minikube addons list` for a list of valid addon names.") startCmd.Flags().String(criSocket, "", "The cri socket path to be used.") startCmd.Flags().String(networkPlugin, "", "Kubelet network plug-in to use (default: auto)") @@ -516,7 +517,7 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s } cc.VerifyComponents = interpretWaitFlag(*cmd) if viper.GetBool(createMount) && driver.IsKIC(drvName) { - cc.ContainerVolumeMounts = []string{viper.GetString(mountString)} + cc.ContainerVolumeMounts = viper.GetStringSlice(mountString) } if detect.IsCloudShell() {