Commit Graph

328 Commits (c0d81683a8d14bc8cf7cb62ebce5ddd7aa33a9bf)

Author SHA1 Message Date
Matt Rickard bf32cee2cd Merge pull request #1287 from r2d4/no-parallel
Don't run TestGetLogs in parallel
2017-03-27 11:24:54 -07:00
Srini Brahmaroutu 41f41646a5 Fixed the certification generation to use the correct IP.
When invoking localkube a certificate is not correctly generated for the
target ip. For example, when network 10.0.0.1/24 is parsed it generates
a certificate for 10.0.0.0 instead of 10.0.0.1.

Fixed #1215. (with @mhbauer)
2017-03-24 17:02:28 -07:00
Matt Rickard 046d76796d Don't run TestGetLogs in parallel
Concurrent map writes
2017-03-23 11:29:24 -07:00
Matt Rickard 918b36ad6e Check APIServerName against default
If the apiserver is something other than the default, pass in the flag.
 This won't be compatible with the old versions of localkube.  Old
versions of localkube will work as long as apiserver-name is not
specified in minikube, always using the default.
2017-03-23 10:28:42 -07:00
Matt Rickard 12e41aeaba Merge pull request #1273 from r2d4/logs
Add -f --folow option to minikube logs
2017-03-21 11:44:10 -07:00
Matt Rickard c9a5152e21 Add -f --folow option to minikube logs
Allows tailing of the logs
2017-03-21 11:04:35 -07:00
Max Lavrenov ae153c6348 add --docker-opt parameter which passes flags to docker daemon 2017-03-20 23:39:55 +01:00
Matt Rickard bc10d55097 Only pass in APIServerName flag is specified
Otherwise, compatibility with old versions of localkube is broken in
all cases.  APIServerName flag can still only be specified in v1.5.3 or
newer.
2017-03-15 15:37:22 -07:00
dlorenc 964ff65f39 Fix gofmt. 2017-03-14 10:07:34 -07:00
dlorenc 63ac7e8a76 Fix tests. 2017-03-13 10:21:14 -07:00
dlorenc c220ada63b Fix tests. 2017-03-07 15:00:19 -05:00
Dale Hamel 107e3324a6 Add support for parsing CIDRs to config 2017-03-07 14:59:36 -05:00
Eden Li c632321122 support componentconfigs with native type aliases
Some componentconfig options are aliased to native convertible types
(e.g. ProxyMode) but FindAndSet() was unable to detect that and so it
wasn't possible to set these values via `--extra-config`.

This change addresses that by using the reflected value's Kind instead
of a type assertion on its interface.

It's also worth noting that any value with the type Duration (e.g.
proxy.IPTablesSyncPeriod) is also unable to be set for the same reason,
but this commit does not address that.

See https://github.com/kubernetes/minikube/issues/1217
2017-03-03 01:29:46 -08:00
Matt Rickard 3b6d4672ac Remove vendored in kvm driver
The vendored in KVM driver make minikube dynamically linked to libvirt
libraries, even for virtualbox users.
2017-03-02 17:09:33 -08:00
dlorenc e969ebe87b Add an external hostpath provisioner to localkube. 2017-03-01 11:05:14 -08:00
Davanum Srinivas 8584cf8761 Fix test break 2017-02-27 21:47:30 -05:00
Aaron Prindle 56d4824456 Merge pull request #1149 from aaron-prindle/api-name-configurable
Added API Name as configuration option
2017-02-27 15:18:56 -08:00
Aaron Prindle 9b539db1ff Merge pull request #1143 from upmc-enterprises/registryCredsPrompt
Allow for addons to prompt for data input
2017-02-27 11:19:02 -08:00
Steve Sloka 706d02b926 Fix go-client / Refactor k8s util code 2017-02-27 12:52:33 -05:00
Steve Sloka c3d962b58c Allow for addons to prompt for data input 2017-02-27 11:09:09 -05:00
Dongsu Park ac513ebb1e pkg: fix host IP address for KVM driver for 9pfs mount
In case of KVM driver, "minikube mount" does not work, when mounting any
host directory via 9pfs. That's because in case of the KVM driver, a
different IP address is assigned to the host, 192.168.42.1, while other
drivers assign 10.0.2.2. That's why the following command hangs forever
inside the VM.

```
$ sudo mount -t 9p -o trans=tcp -o port=5640 10.0.2.2 /mount-9p
```

Fix it by changing the host IP address for the KVM driver.
2017-02-27 14:15:33 +01:00
Dan Lorenc b7a5ebed1b Add a default storage class/provisioner. 2017-02-25 14:48:04 -08:00
Aaron Prindle 60a5910f88 Added 9p server as well as minikube mount command 2017-02-25 10:08:45 -08:00
Matt Rickard b26f0aa66b Merge pull request #1154 from r2d4/svc-tests
Refactor service package and add test coverage
2017-02-24 13:19:07 -08:00
Dongsu Park 4eb9e92dff pkg: fix data race around KubeConfigFile
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.
2017-02-24 17:58:59 +01:00
Dongsu Park 6cf5ba7a28 pkg: fix data race around CommandToOutput
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.
2017-02-24 17:58:59 +01:00
Dongsu Park e22b268f7f pkg: fix data race around HasASessionRequested
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.
2017-02-24 17:58:10 +01:00
Aaron Prindle f247803779 Merge pull request #1146 from aaron-prindle/transfer-refactor
Refactored file transfer code to better abstract ssh
2017-02-23 14:07:01 -08:00
Andreas Kohn bba2ef86ee
Add the 'minikube' user to the 'system:masters' group 2017-02-23 14:20:15 +01:00
Matt Rickard b78fb926bc Merge pull request #1160 from r2d4/kubeconfig-tests
Add test coverage for SetupKubeConfig
2017-02-22 13:25:54 -08:00
Matt Rickard c4196b65be Add test coverage for SetupKubeConfig 2017-02-22 11:39:55 -08:00
Aaron Prindle 574c543f4a Refactored file transfer code to better abstract ssh 2017-02-22 09:46:51 -08:00
Aaron Prindle 68973786d6 Added test coverage for ParseSHAFromURL 2017-02-21 21:33:40 -08:00
Matt Rickard 213857032a Merge pull request #1156 from r2d4/client-tests
Add test coverage for pkg/minikube/machine
2017-02-21 10:26:38 -08:00
Matt Rickard 45e61ab75a Add test coverage for pkg/minikube/machine 2017-02-21 10:26:10 -08:00
Aaron Prindle 3d91f91ede Merge pull request #1159 from aaron-prindle/downloader-tests
Added unit tests to downloader.go
2017-02-21 10:17:57 -08:00
Matt Rickard e0a5dbc4f8 Add test coverage for GenerateSignedCert 2017-02-21 10:16:59 -08:00
Matt Rickard 69f0a9f99a Refactor service package and add test coverage 2017-02-20 11:24:36 -08:00
Aaron Prindle 6959aa0ce2 Added unit tests to downloader.go 2017-02-19 21:01:01 -08:00
Aaron Prindle 3433a3028c Added API Name as configuration option 2017-02-18 15:49:49 -08:00
Aaron Prindle ffcccbd646 Merge pull request #1145 from aaron-prindle/etcd-access
Change etcd to be accessible within pods
2017-02-17 15:41:44 -08:00
Aaron Prindle d3531c9eec Change etcd to be accessible within pods 2017-02-17 15:40:48 -08:00
Matt Rickard 88f8782d97 Merge pull request #1140 from r2d4/service-refactor
Refactor services into its own package
2017-02-17 15:39:36 -08:00
Matt Rickard 86b1fd1916 Refactor services into its own package
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
2017-02-17 09:58:22 -08:00
Davanum Srinivas 39df4cb543 Force libmachine to use Native Go SSH client
Some platforms looking up and finding the ssh executable can be
problematic, so let's just use the same Go based SSH everywhere.

Fixes #1086
2017-02-17 12:04:29 -05:00
Matt Rickard a125157f44 Detect and test against ISO changes
When changes are made to the ISO folder, rebuild and upload the newly
modified image.  Use this uploaded image as the default in the e2e test
binaries, so that the e2e test suite runs against the PR's changes.

TODO: Subsequent PRs (no changes to ISO) will still run against the
default version in the makefile.  We should figure out if we want to
always run tests against the "latest" image.
2017-02-14 13:42:20 -08:00
Matt Rickard 2410b268f7 Slim down driverGetter type
Remove unused driverName from this type
2017-02-13 10:58:09 -08:00
Aaron Prindle c418095c38 Added MINIKUBE_HOME env variable which sets .minikube directory 2017-02-09 11:07:44 -08:00
Matt Rickard d9355d89e7 Merge pull request #1074 from r2d4/release-iso
Add release-iso Makefile rule
2017-02-08 18:40:59 -08:00
Matt Rickard b9a115b3ae Add LocalClient to bypass RPC for drivers
This adds a new libmachine API implementation that skips RPC and instead
uses a vendored in driver directly.  This removes the need to download a
separate driver binary.  Currently, only the "core" drivers, and kvm are
supported as vendored in.  This means that xhyve is the only driver that
requires a separate binary for now.
2017-02-06 21:17:22 -08:00