Skip to content

Commit

Permalink
Merge pull request kubernetes#4738 from josedonizetti/move-supported-…
Browse files Browse the repository at this point in the history
…drivers-per-platform

Move supported drivers per platform
  • Loading branch information
tstromberg authored Jul 17, 2019
2 parents d15eb12 + 2ed16a1 commit fe6e2b1
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ mdlint:
@$(MARKDOWNLINT) $(MINIKUBE_MARKDOWN_FILES)

out/docs/minikube.md: $(shell find cmd) $(shell find pkg/minikube/constants) pkg/minikube/assets/assets.go pkg/minikube/translate/translations.go
go run -ldflags="$(MINIKUBE_LDFLAGS)" hack/help_text/gen_help_text.go
go run -ldflags="$(MINIKUBE_LDFLAGS)" -tags gendocs hack/help_text/gen_help_text.go

out/minikube_$(DEB_VERSION).deb: out/minikube-linux-amd64
cp -r installers/linux/deb/minikube_deb_template out/minikube_$(DEB_VERSION)
Expand Down
15 changes: 0 additions & 15 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,6 @@ const DriverXhyve = "xhyve"
// DriverParallels is the parallels driver option name
const DriverParallels = "parallels"

// SupportedVMDrivers is a list of supported drivers on all platforms. Currently
// used in gendocs.
var SupportedVMDrivers = [...]string{
DriverVirtualbox,
DriverParallels,
DriverVmwareFusion,
DriverKvmOld,
DriverXhyve,
DriverHyperv,
DriverHyperkit,
DriverKvm2,
DriverVmware,
DriverNone,
}

// DefaultMinipath is the default Minikube path (under the home directory)
var DefaultMinipath = filepath.Join(homedir.HomeDir(), ".minikube")

Expand Down
12 changes: 11 additions & 1 deletion pkg/minikube/constants/constants_darwin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build darwin
// +build darwin, !gendocs

/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Expand All @@ -19,3 +19,13 @@ limitations under the License.
package constants

var DefaultMountDir = "/Users"

// SupportedVMDrivers is a list of supported drivers on Darwin.
var SupportedVMDrivers = [...]string{
DriverVirtualbox,
DriverParallels,
DriverVmwareFusion,
DriverXhyve,
DriverHyperKit,
DriverVmware,
}
35 changes: 35 additions & 0 deletions pkg/minikube/constants/constants_gendocs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// +build gendocs

/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package constants

var DefaultMountDir = "$HOME"

// SupportedVMDrivers is a list of supported drivers on all platforms.
var SupportedVMDrivers = [...]string{
DriverVirtualbox,
DriverParallels,
DriverVmwareFusion,
DriverKvmOld,
DriverXhyve,
DriverHyperv,
DriverHyperkit,
DriverKvm2,
DriverVmware,
DriverNone,
}
13 changes: 12 additions & 1 deletion pkg/minikube/constants/constants_linux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build linux
// +build linux, !gendocs

/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Expand All @@ -24,3 +24,14 @@ import (

// DefaultMountDir is the default mount dir
var DefaultMountDir = homedir.HomeDir()

// SupportedVMDrivers is a list of supported drivers on Linux.
var SupportedVMDrivers = [...]string{
DriverVirtualbox,
DriverParallels,
DriverVmwareFusion,
DriverKvmOld,
DriverKvm2,
DriverVmware,
DriverNone,
}
10 changes: 9 additions & 1 deletion pkg/minikube/constants/constants_windows.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build windows
// +build windows, !gendocs

/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Expand All @@ -23,3 +23,11 @@ import (
)

var DefaultMountDir = homedir.HomeDir()

// SupportedVMDrivers is a list of supported drivers on Windows.
var SupportedVMDrivers = [...]string{
DriverVirtualbox,
DriverVmwareFusion,
DriverHyperv,
DriverVmware,
}

0 comments on commit fe6e2b1

Please sign in to comment.