Skip to content

WIP: Rename None driver to Native and replace all references #10579

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ docker-machine-driver-kvm2: out/docker-machine-driver-kvm2 ## Build KVM2 driver
integration: out/minikube$(IS_EXE) ## Trigger minikube integration test, logs to ./out/testout_COMMIT.txt
go test -ldflags="${MINIKUBE_LDFLAGS}" -v -test.timeout=90m $(INTEGRATION_TESTS_TO_RUN) --tags="$(MINIKUBE_INTEGRATION_BUILD_TAGS)" $(TEST_ARGS) 2>&1 | tee "./out/testout_$(COMMIT_SHORT).txt"

.PHONY: integration-none-driver
integration-none-driver: e2e-linux-$(GOARCH) out/minikube-linux-$(GOARCH) ## Trigger minikube none driver test, logs to ./out/testout_COMMIT.txt
sudo -E out/e2e-linux-$(GOARCH) -testdata-dir "test/integration/testdata" -minikube-start-args="--driver=none" -test.v -test.timeout=60m -binary=out/minikube-linux-amd64 $(TEST_ARGS) 2>&1 | tee "./out/testout_$(COMMIT_SHORT).txt"
.PHONY: integration-native-driver
integration-native-driver: e2e-linux-$(GOARCH) out/minikube-linux-$(GOARCH) ## Trigger minikube native driver test, logs to ./out/testout_COMMIT.txt
sudo -E out/e2e-linux-$(GOARCH) -testdata-dir "test/integration/testdata" -minikube-start-args="--driver=native" -test.v -test.timeout=60m -binary=out/minikube-linux-amd64 $(TEST_ARGS) 2>&1 | tee "./out/testout_$(COMMIT_SHORT).txt"

.PHONY: integration-versioned
integration-versioned: out/minikube ## Trigger minikube integration testing, logs to ./out/testout_COMMIT.txt
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/docker-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ var dockerEnvCmd = &cobra.Command{
co := mustload.Running(cname)
driverName := co.CP.Host.DriverName

if driverName == driver.None {
if driverName == driver.Native {
exit.Message(reason.EnvDriverConflict, `'none' driver does not support 'minikube docker-env' command`)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ var mountCmd = &cobra.Command{
}

co := mustload.Running(ClusterFlagValue())
if co.CP.Host.Driver.DriverName() == driver.None {
if co.CP.Host.Driver.DriverName() == driver.Native {
exit.Message(reason.Usage, `'none' driver does not support 'minikube mount' command`)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/node_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var nodeAddCmd = &cobra.Command{
cc := co.Config

if driver.BareMetal(cc.Driver) {
out.FailureT("none driver does not support multi-node clusters")
out.FailureT("native driver does not support multi-node clusters")
}

name := node.Name(len(cc.Nodes) + 1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/podman-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ var podmanEnvCmd = &cobra.Command{
co := mustload.Running(cname)
driverName := co.CP.Host.DriverName

if driverName == driver.None {
if driverName == driver.Native {
exit.Message(reason.Usage, `'none' driver does not support 'minikube podman-env' command`)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/ssh-host.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var sshHostCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()
co := mustload.Running(cname)
if co.CP.Host.DriverName == driver.None {
if co.CP.Host.DriverName == driver.Native {
exit.Message(reason.Usage, "'none' driver does not support 'minikube ssh-host' command")
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var sshCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
cname := ClusterFlagValue()
co := mustload.Running(cname)
if co.CP.Host.DriverName == driver.None {
if co.CP.Host.DriverName == driver.Native {
exit.Message(reason.Usage, "'none' driver does not support 'minikube ssh' command")
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ func startWithDriver(cmd *cobra.Command, starter node.Starter, existing *config.
}
if numNodes > 1 {
if driver.BareMetal(starter.Cfg.Driver) {
exit.Message(reason.DrvUnsupportedMulti, "The none driver is not compatible with multi-node clusters.")
exit.Message(reason.DrvUnsupportedMulti, "The native driver is not compatible with multi-node clusters.")
} else {
if existing == nil {
for i := 1; i < numNodes; i++ {
Expand Down Expand Up @@ -834,8 +834,8 @@ func validateUser(drvName string) {

useForce := viper.GetBool(force)

// None driver works with root and without root on Linux
if runtime.GOOS == "linux" && drvName == driver.None {
// Native driver works with root and without root on Linux
if runtime.GOOS == "linux" && drvName == driver.Native {
if !viper.GetBool(interactive) {
test := exec.Command("sudo", "-n", "echo", "-n")
if err := test.Run(); err != nil {
Expand Down
8 changes: 8 additions & 0 deletions cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,14 @@ func upgradeExistingConfig(cc *config.ClusterConfig) {
cc.KicBaseImage = viper.GetString(kicBaseImage)
klog.Infof("config upgrade: KicBaseImage=%s", cc.KicBaseImage)
}

if cc.Driver == driver.AliasNone || cc.VMDriver == driver.AliasNone {
// If a cluster was created before or with minikube v1.17.1 the driver
// name is stored as `none` in the config. We need to change that to
// `native` for future processing.
cc.Driver = driver.Native
cc.VMDriver = driver.Native
}
}

// updateExistingConfigFromFlags will update the existing config from the flags - used on a second start
Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func TestBaseImageFlagDriverCombo(t *testing.T) {
}{
{driver.Docker, true},
{driver.Podman, true},
{driver.None, false},
{driver.Native, false},
{driver.KVM2, false},
{driver.VirtualBox, false},
{driver.HyperKit, false},
Expand Down
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
cloud.google.com/go v0.74.0 h1:kpgPA77kSSbjSs+fWHkPTxQ6J5Z2Qkruo5jfXEkHxNQ=
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
cloud.google.com/go v0.75.0 h1:XgtDnVJRCPEUG21gjFiRPz4zI1Mjg16R+NYQjfmU4XY=
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
Expand All @@ -39,6 +40,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.13.0 h1:amPvhCOI+Hltp6rPu+62YdwhIrjf+34PKVAL4HwgYwk=
cloud.google.com/go/storage v1.13.0/go.mod h1:pqFyBUK3zZqMIIU5+8NaZq6/Ma3ClgUg9Hv5jfuJnvo=
contrib.go.opencensus.io/exporter/stackdriver v0.12.1 h1:Dll2uFfOVI3fa8UzsHyP6z0M6fEc9ZTAMo+Y3z282Xg=
contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw=
Expand Down Expand Up @@ -1024,6 +1026,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8=
golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1 h1:Kvvh58BN8Y9/lBi7hTekvtMpm07eUZ0ck5pRHpsMWrY=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -1077,6 +1080,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11 h1:lwlPPsmjDKK0J6eG6xDWd5XPehI0R024zxjDnw3esPA=
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -1088,6 +1092,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 h1:Lm4OryKCca1vehdsWogr9N4t7NfZxLbJoc/H0w4K4S4=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3 h1:BaN3BAqnopnKjvl+15DYP6LLrbBHfbfmlFYzmFj/Q9Q=
golang.org/x/oauth2 v0.0.0-20210113205817-d3ed898aa8a3/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -1162,6 +1167,7 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad h1:MCsdmFSdEd4UEa5TKS5JztCRHK/WtvNei1edOj5RSRo=
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down Expand Up @@ -1252,6 +1258,7 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818 h1:u2ssHESKr0HP2d1wlnjMKH+V/22Vg1lGCVuXmOYU1qA=
golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down Expand Up @@ -1335,6 +1342,7 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d h1:HV9Z9qMhQEsdlvxNFELgQ11RkMzO3CMkjEySjCtuLes=
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210203152818-3206188e46ba h1:np3A9jnmE/eMtrOwwvUycmQ1XoLyj5nqZ41bAyYLqJ0=
google.golang.org/genproto v0.0.0-20210203152818-3206188e46ba/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
Expand All @@ -1355,6 +1363,7 @@ google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
6 changes: 3 additions & 3 deletions hack/jenkins/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export PATH=$PATH:"/usr/local/bin/:/usr/local/go/bin/:$GOPATH/bin"
readonly TIMEOUT=${1:-70m}

if [ "$(uname)" != "Darwin" ]; then
# install lsof for finding none driver procs, psmisc to use pstree in cronjobs
# install lsof for finding native driver procs, psmisc to use pstree in cronjobs
sudo apt-get -y install lsof psmisc
fi

Expand Down Expand Up @@ -227,13 +227,13 @@ if [[ "${kprocs}" != "" ]]; then
fi


# clean up none drivers binding on 8443
# clean up native drivers binding on 8443
none_procs=$(sudo lsof -i :8443 | tail -n +2 | awk '{print $2}' || true)
if [[ "${none_procs}" != "" ]]; then
echo "Found stale api servers listening on 8443 processes to kill: "
for p in $none_procs
do
echo "Kiling stale none driver: $p"
echo "Kiling stale native driver: $p"
sudo -E ps -f -p $p || true
sudo -E kill $p || true
sudo -E kill -9 $p || true
Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/linux_integration_tests_none.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ sudo systemctl is-active --quiet kubelet \
&& echo "stopping kubelet" \
&& sudo systemctl stop -f kubelet

# conntrack is required for kubernetes 1.18 and higher for none driver
# conntrack is required for kubernetes 1.18 and higher for native driver
if ! conntrack --version &>/dev/null; then
echo "WARNING: contrack is not installed. will try to install."
sudo apt-get update -qq
Expand Down
12 changes: 6 additions & 6 deletions pkg/drivers/none/none.go → pkg/drivers/native/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package none
package native

import (
"fmt"
Expand Down Expand Up @@ -43,7 +43,7 @@ var cleanupPaths = []string{
}

// Driver is a driver designed to run kubeadm w/o VM management.
// https://minikube.sigs.k8s.io/docs/reference/drivers/none/
// https://minikube.sigs.k8s.io/docs/reference/drivers/native/
type Driver struct {
*drivers.BaseDriver
*pkgdrivers.CommonDriver
Expand All @@ -52,14 +52,14 @@ type Driver struct {
exec command.Runner
}

// Config is configuration for the None driver
// Config is configuration for the Native driver
type Config struct {
MachineName string
StorePath string
ContainerRuntime string
}

// NewDriver returns a fully configured None driver
// NewDriver returns a fully configured Native driver
func NewDriver(c Config) *Driver {
runner := command.NewExecRunner(true)
runtime, err := cruntime.New(cruntime.Config{Type: c.ContainerRuntime, Runner: runner})
Expand All @@ -84,7 +84,7 @@ func (d *Driver) PreCreateCheck() error {

// Create a host using the driver's config
func (d *Driver) Create() error {
// creation for the none driver is handled by commands.go
// creation for the native driver is handled by commands.go
return nil
}

Expand Down Expand Up @@ -229,7 +229,7 @@ func (d *Driver) Stop() error {
return errors.Wrap(err, "stop containers")
}
}
klog.Infof("none driver is stopped!")
klog.Infof("native driver is stopped!")
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/minikube/bootstrapper/bsutil/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func NewKubeletService(cfg config.KubernetesConfig) ([]byte, error) {

// KubeNodeName returns the node name registered in Kubernetes
func KubeNodeName(cc config.ClusterConfig, n config.Node) string {
if cc.Driver == driver.None {
// Always use hostname for "none" driver
if cc.Driver == driver.Native {
// Always use hostname for "native" driver
hostname, _ := os.Hostname()
return hostname
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/minikube/bootstrapper/kubeadm/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ func (f *FailFastError) Error() string {
return f.Err.Error()
}

// ErrNoExecLinux is thrown on linux when the kubeadm binaries are mounted in a noexec volume on Linux as seen in https://github.com/kubernetes/minikube/issues/8327#issuecomment-651288459
// this error could be seen on docker/podman or none driver.
// ErrNoExecLinux is thrown on linux when the kubeadm binaries are mounted in a noexec volume on Linux as seen in
// https://github.com/kubernetes/minikube/issues/8327#issuecomment-651288459
// this error could be seen on docker/podman or native driver.
var ErrNoExecLinux = &FailFastError{errors.New("mounted kubeadm binary is not executable")}

// ErrInitTimedout is thrown if kubeadm init takes longer than max time allowed
Expand Down
6 changes: 3 additions & 3 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ func (k *Bootstrapper) init(cfg config.ClusterConfig) error {
"FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml",
"FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml",
"FileAvailable--etc-kubernetes-manifests-etcd.yaml",
"Port-10250", // For "none" users who already have a kubelet online
"Swap", // For "none" users who have swap configured
"Port-10250", // For "native" users who already have a kubelet online
"Swap", // For "native" users who have swap configured
}
if version.GE(semver.MustParse("1.20.0")) {
ignore = append(ignore,
"Mem", // For "none" users who have too little memory
"Mem", // For "native" users who have too little memory
)
}
ignore = append(ignore, bsutil.SkipAdditionalPreflights[r.Name()]...)
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cluster/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func HostIP(host *host.Host, clusterName string) (net.IP, error) {
return []byte{}, errors.Wrap(err, "Error converting VM IP address to IPv4 address")
}
return net.IPv4(vmIP[0], vmIP[1], vmIP[2], byte(1)), nil
case driver.None:
case driver.Native:
return net.ParseIP("127.0.0.1"), nil
default:
return []byte{}, fmt.Errorf("HostIP not yet implemented for %q driver", host.DriverName)
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cni/kindnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (c KindNet) manifest() (assets.CopyableFile, error) {

// Apply enables the CNI
func (c KindNet) Apply(r Runner) error {
// This is mostly applicable to the 'none' driver
// This is mostly applicable to the 'native' driver
_, err := r.RunCmd(exec.Command("stat", "/opt/cni/bin/portmap"))
if err != nil {
return errors.Wrap(err, "required 'portmap' CNI plug-in not found")
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/cruntime/cruntime.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func New(c Config) (Manager, error) {

// ContainerStatusCommand works across container runtimes with good formatting
func ContainerStatusCommand() string {
// Fallback to 'docker ps' if it fails (none driver)
// Fallback to 'docker ps' if it fails (native driver)
return "sudo `which crictl || echo crictl` ps -a || sudo docker ps -a"
}

Expand Down
16 changes: 8 additions & 8 deletions pkg/minikube/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const (
Docker = "docker"
// Mock driver
Mock = "mock"
// None driver
None = "none"
// Native driver
Native = "native"
// SSH driver
SSH = "ssh"
// KVM2 driver
Expand All @@ -59,8 +59,8 @@ const (
AliasKVM = "kvm"
// AliasSSH is driver name alias for ssh
AliasSSH = "generic"
// AliasNative is driver name alias for None driver
AliasNative = "native"
// AliasNone is driver name alias for Native driver
AliasNone = "none"
)

var (
Expand Down Expand Up @@ -150,7 +150,7 @@ func IsVM(name string) bool {

// BareMetal returns if this driver is unisolated
func BareMetal(name string) bool {
return name == None || name == Mock
return name == Native || name == Mock
}

// IsSSH checks if the driver is ssh
Expand Down Expand Up @@ -179,7 +179,7 @@ func IsMicrosoftWSL() bool {

// HasResourceLimits returns true if driver can set resource limits such as memory size or CPU count.
func HasResourceLimits(name string) bool {
return name != None
return name != Native
}

// NeedsShutdown returns true if driver needs manual shutdown command before stopping.
Expand Down Expand Up @@ -216,13 +216,13 @@ type FlagHints struct {
// FlagDefaults returns suggested defaults based on a driver
func FlagDefaults(name string) FlagHints {
fh := FlagHints{}
if name != None {
if name != Native {
fh.CacheImages = true
return fh
}

fh.CacheImages = false
// if specifc linux add this option for systemd work on none driver
// if specifc linux add this option for systemd work on native driver
if _, err := os.Stat(systemdResolvConf); err == nil {
noneEO := fmt.Sprintf("kubelet.resolv-conf=%s", systemdResolvConf)
fh.ExtraOptions = append(fh.ExtraOptions, noneEO)
Expand Down
Loading