Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const (
defaultSSHUser = "root"
defaultSSHPort = 22
listenAddress = "listen-address"
vmwareNetworkType = "vmware-network-type"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zarenner sorry for the changing in my opinion, but how about we called this flag "network-type"
and then then specify this is only currently used for for vmwware and then if user specificed a value for this flag for non-vmware drivers, we should Exit with Exit With Usage

				exit.Message(reason.Usage, "network-type flag is currently only supported only by the vm-ware driver "

)

var (
Expand Down Expand Up @@ -220,6 +221,9 @@ func initDriverFlags() {
// docker & podman
startCmd.Flags().String(listenAddress, "", "IP Address to use to expose ports (docker and podman driver only)")
startCmd.Flags().StringSlice(ports, []string{}, "List of ports that should be exposed (docker and podman driver only)")

// vmware
startCmd.Flags().String(vmwareNetworkType, "nat", "Network connection type to use. One of 'nat', 'bridged', 'hostonly', 'custom' (vmware driver only)")
}

// initNetworkingFlags inits the commandline flags for connectivity related flags for start
Expand Down Expand Up @@ -418,6 +422,7 @@ func generateNewConfigFromFlags(cmd *cobra.Command, k8sVersion string, drvName s
SSHUser: viper.GetString(sshSSHUser),
SSHKey: viper.GetString(sshSSHKey),
SSHPort: viper.GetInt(sshSSHPort),
VMWareNetworkType: viper.GetString(vmwareNetworkType),
KubernetesConfig: config.KubernetesConfig{
KubernetesVersion: k8sVersion,
ClusterName: ClusterFlagValue(),
Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type ClusterConfig struct {
ExposedPorts []string // Only used by the docker and podman driver
ListenAddress string // Only used by the docker and podman driver
Network string // only used by docker driver
VMWareNetworkType string // Only used by vmware driver
MultiNodeRequested bool
}

Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/registry/drvs/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) {
d.Memory = cc.Memory
d.CPU = cc.CPUs
d.DiskSize = cc.DiskSize
d.NetworkType = cc.VMWareNetworkType

// TODO(frapposelli): push these defaults upstream to fixup this driver
d.SSHPort = 22
Expand Down
6 changes: 6 additions & 0 deletions site/content/en/docs/drivers/vmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ No documentation is available yet.
{{% /windowstab %}}
{{% /tabs %}}

## Special features

minikube start supports some VMWare specific flags:

* **`--vmware-network-type`**: Network connection type to use. One of 'nat', 'bridged', 'hostonly', 'custom'. This affects the "Network Adapter" settings inside the VMWare VM.

## Issues

* [Full list of open 'vmware-driver' issues](https://github.com/kubernetes/minikube/labels/co%2Fvmware-driver)
Expand Down