This makefile dependency is currently only on the folder, not the files
within. With this PR, the makefile will rebuild the assets when
changes are made to deploy/addons
TestSetupKubeConfig fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Write at 0x00c4201cc4b8 by goroutine 16:
k8s.io/minikube/pkg/minikube/kubeconfig.TestSetupKubeConfig.func1()
k8s.io/minikube/pkg/minikube/kubeconfig/config_test.go:103 +0x23a
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
```
To fix that, convert KubeConfigFile to an atomic value that stores
string. Callers should run helper functions, SetKubeConfigFile() and
GetKubeConfigFile() instead of direct access to the value.
TestGetLocalkubeStatus fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Read at 0x00c420435378 by goroutine 43:
k8s.io/minikube/pkg/minikube/tests.(*SSHServer).Start.func1.1()
k8s.io/minikube/pkg/minikube/tests/ssh_mock.go:122 +0x389
Previous write at 0x00c420435378 by goroutine 40:
k8s.io/minikube/pkg/minikube/cluster.TestGetLocalkubeStatus()
k8s.io/minikube/pkg/minikube/cluster/cluster_test.go:359 +0x540
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
```
To fix that, convert CommandToOutput to an atomic value that stores
the map. Callers should run helper functions, SetCommandToOutput() and
GetCommandToOutput() instead of direct access to the value.
TestCreateSSHShell fails when running "go test --race", because of
concurrent accesses from multiple goroutines.
```
WARNING: DATA RACE
Read at 0x00c42025b730 by goroutine 42:
k8s.io/minikube/pkg/minikube/cluster.TestCreateSSHShell()
k8s.io/minikube/pkg/minikube/cluster/cluster_test.go:523 +0x543
testing.tRunner()
/usr/local/golang/src/testing/testing.go:657 +0x107
Previous write at 0x00c42025b730 by goroutine 49:
k8s.io/minikube/pkg/minikube/tests.(*SSHServer).Start.func1.1()
k8s.io/minikube/pkg/minikube/tests/ssh_mock.go:95 +0x743
```
To fix that, convert HadASessionRequested to an atomic variable.
Callers should run helper functions, SetSessionRequested() and
IsSessionRequested() instead of direct access to the variable.
If minikube is built with go 1.8 or newer, localkube panics immediately
with the following message:
```
Feb 21 15:04:05 minikube localkube[3566]: I0221 15:04:05.712095 3566 services.go:51] Setting service IP to "10.0.0.1" (read-write).
Feb 21 15:04:05 minikube localkube[3566]: panic: parse 127.0.0.1:8080: first path segment in URL cannot contain colon
Feb 21 15:04:05 minikube localkube[3566]: goroutine 151 [running]:
Feb 21 15:04:05 minikube localkube[3566]: k8s.io/minikube/vendor/k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion.NewForConfigOrDie(0xc420c75380, 0xc420d04d40)
```
This issue was already reported to Kubernetes,
https://github.com/kubernetes/kubernetes/issues/38380. That was already
fixed in Kubernetes, but it's not included in Minikube yet.
So let's cherry-pick the commit to minikube, to avoid the panic.
Original commit message from
https://github.com/kubernetes/kubernetes/pull/38519
```
If there is any error in the initial parsing then we should just try
adding the scheme.
url.Parse(base) has changed in 1.8. Please see the following change
c5ccbdd22b
Fixes https://github.com/kubernetes/kubernetes/issues/38380
```
/cc @dims
pkg/minikube/cluster has become too crowded with service related
functions. I've moved these to their own package, which will make
updating client-go easier because everything will be in one place.
There is still a little bit of work to be done with making
pkg/minikube/cluster free of references to kubernetes packages