Commit Graph

261 Commits (57f6d877ed47a95e7a5173357396195fe3d831e1)

Author SHA1 Message Date
Thomas Strömberg ca51bada64
Merge pull request #3965 from tstromberg/v1.14-tmpl
Fix all the kubeadm config generation bugs, add tests across versions
2019-03-26 15:32:30 -07:00
Thomas Stromberg 7233a2d50d Allow mount to work when the uid/gid of docker changes 2019-03-26 14:27:50 -07:00
Anders F Björklund 4667c28164 Merge branch 'master' into cyclo 2019-03-26 07:16:28 +01:00
Thomas Stromberg 9004134eb8 Fix invalid feature-gates argument 2019-03-25 21:02:44 -07:00
Thomas Stromberg 9f753c3027 Fix all the kubeadm config generation bugs I could find, add tests across versions 2019-03-25 18:25:01 -07:00
Thomas Strömberg c3d0b33d21
Merge pull request #3929 from sharifelgamal/version-upgrade-test
Adding test to make sure HEAD can run on VM created by latest release
2019-03-25 13:27:58 -07:00
Sharif Elgamal 4fc03fe1ef
addressing comments 2019-03-25 11:50:06 -07:00
Thomas Strömberg cc5d4e9724
Merge branch 'master' into rkt-remove 2019-03-25 11:31:09 -07:00
Anders F Björklund 71b3e3ec5d Store the toolbox on the disk instead of rootfs
There was a lack of "disk" space, when using memory.

This also makes the toolbox persistent over reboots.
2019-03-25 07:41:21 +01:00
Anders F Björklund 2590fc7b9a Remove the rkt container runtime
It has not been updated since kubernetes 1.9 or so
2019-03-24 08:50:58 +01:00
Thomas Strömberg cbac94a53d
Merge pull request #3879 from marcosdiez/extra_config_for_kubeadm
--extra-config now work for kubeadm as well
2019-03-21 22:03:06 -07:00
Thomas Stromberg 1ff174b796 Run: gofmt -s -w 2019-03-21 22:00:14 -07:00
Sharif Elgamal c3849b3781
gofmt 2019-03-21 17:46:46 -07:00
Sharif Elgamal ffaa27b256
Adding test to make sure HEAD can run on VM created by latest release 2019-03-21 17:36:13 -07:00
Marcos Diez 8aec728a86 start_stop_delete_test.go now tests for "--extra-config kubeadm.ignore-preflight-errors=SystemVerification" too 2019-03-21 09:11:55 -03:00
Thomas Strömberg 4756b15bc1
Merge branch 'master' into lint 2019-03-20 10:16:09 -07:00
Anders F Björklund 03bdce47ee Decrease cyclomatic complexity for test
Mostly by using the "extract method" pattern.

Here was the report (from gocyclo), before:

17 tunnel TestTunnelManagerCleanup pkg/minikube/tunnel/tunnel_manager_test.go:174:1
44 tunnel TestTunnel pkg/minikube/tunnel/tunnel_test.go:35:1
34 kubeconfig configEquals pkg/util/kubeconfig/config_test.go:420:1
25 integration testMounting test/integration/mount_test.go:36:1
18 integration testTunnel test/integration/tunnel_test.go:37:1
2019-03-16 23:04:24 +01:00
Anders F Björklund edf46f003f Document all exported functions outside minikube 2019-03-16 16:57:37 +01:00
Thomas Stromberg 4f44208ba3 Refactor functional tests to not rely on SetRuntime, use short variable name 2019-03-08 12:30:41 -08:00
Thomas Stromberg 02a06a8da6 Second Start call should also pass in the new test.args list 2019-03-06 15:50:57 -08:00
Thomas Stromberg e09133892f Fix docker/containerd caching, improve msgs, add tests 2019-02-27 13:58:33 -08:00
Thomas Stromberg 61d0516bba Fix TestStartStop so that none tests are executed 2019-02-14 20:26:24 -08:00
Anders F Björklund abb5fc0af0 Show name as CRI-O, even if class is CRIO
Should use the proper name for display, even if we use a name more
suitable to naming classes and methods for the implementation...

Also use the --runtime=cri-o when testing, and update the github
repository now that cri-o has graduated from incubator to a sig.

See https://cri-o.io/
2019-02-12 21:03:51 +01:00
Anders F Björklund 78806674f3 Merge branch 'master' into defaults 2019-02-09 18:25:27 +01:00
Thomas Stromberg 966b245dc6 Refactor and centralize container runtime code into a cruntime package 2019-02-05 14:42:12 -08:00
Anders F Björklund 7ef2918100 Remove default cni flags from integration tests 2019-02-05 20:03:29 +01:00
Thomas Strömberg c27d1a0213
Merge pull request #3536 from tstromberg/crio-test
Add CRI-O to TestStartStop
2019-01-25 10:16:00 -08:00
Thomas Stromberg a9ca1d7186 Add --enable-default-cni for CRIO 2019-01-24 16:08:40 -08:00
Nicholas Goozeff d516caadb3
Merge branch 'master' into bug3044 2019-01-20 20:58:15 +11:00
Thomas Stromberg 9e0119b8e2 Add --network-plugin=cni as per afbjorklund's comment 2019-01-18 15:03:05 -08:00
Thomas Stromberg d499497056 Add CRIO flags support to MinikubeRunner.Start() 2019-01-17 10:57:54 -08:00
Thomas Stromberg 218cf179dd Fix T->t typo 2019-01-16 16:20:23 -08:00
Thomas Stromberg f2c7860eab Add CRI-O to TestStartStop 2019-01-16 15:13:20 -08:00
Thomas Strömberg 3aa83674a9
Merge pull request #3441 from brb/2907-no-cni-conf-by-default
Do not include the default CNI config by default
2019-01-15 17:14:20 -08:00
Thomas Stromberg 11f97460a2 Merge branch 'master' into crio-v1.13.0 2019-01-11 10:53:37 -08:00
Thomas Stromberg d1f4e787c6 Don't error if delete fails: there may not be a cluster to delete 2019-01-08 16:22:03 -08:00
Martynas Pumputis d982c4bf74 Do not include the default CNI config by default
Previously, minikube has been shipped with the default CNI config
(/etc/cni/net.d/k8s.conf) in its rootfs. This complicated a lot
when using a custom CNI plugin, as the default config was picked
by kubelet before the custom CNI plugin has installed its own CNI
config. So, the end result was that some Pods were attached to a
network defined in the default config, and some got managed by
the custom plugin.

This commit introduces the flag "--enable-default-cni" to
"minikube start" to trigger the provisioning of the default CNI
config.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
2019-01-03 09:23:29 +01:00
Thomas Stromberg 6f5c380ff6 RunDaemon: tee stderr for debugging 2018-12-21 13:07:49 -08:00
Thomas Stromberg 44a230bfa0 Remove dashboard deployment check from TestPersistence - it's no longer default 2018-12-21 12:03:15 -08:00
Thomas Stromberg 8aae0f72f8 Set --v=5, which seems to be the initial right level for testing 2018-12-20 10:16:47 -08:00
Thomas Stromberg 7f7587d96c Rename TeeWithPrefix to TeePrefix to match Go idioms 2018-12-20 09:54:09 -08:00
Thomas Stromberg 9b707fe234 Add TeeWithPrefix to ssh_runner as well 2018-12-19 17:03:55 -08:00
Thomas Stromberg ab5d433448 Make tee work with RunWithContext also 2018-12-19 11:16:08 -08:00
Thomas Stromberg bc5eb2a1f7 Stream command output from integration tests 2018-12-19 10:42:19 -08:00
priyawadhwa 1514511b7a Change restart policy on gvisor pod (#3445)
* Change restart policy on gvisor pod

Change the restart policy on the gvisor pod to Always. This way, if a
user runs

minikube addons enable gvisor
minikube stop
minikube start

when the addon manager tries to restart the gvisor pod, it will be
restarted and gvisor will start running automatically. This PR also adds an
integration test for this functionality.

* Test stop and start

* Revert test to delete

Revert test to delete for now, for some reason "stop" and then "start"
is failing both locally and in Jenkins for VirtualBox with a "panic test
timed out after 30 min" error
2018-12-11 18:39:57 -08:00
priyawadhwa 8f128a7d10 Enable gvisor addon in minikube (#3399)
This PR adds the code for enabling gvisor in minikube. It adds the pod
that will run when the addon is enabled, and the code for the image
which will run when this happens.

When gvisor is enabled, the pod will download runsc and the
gvisor-containerd-shim. It will replace the containerd config.toml and
restart containerd.

When gvisor is disabled, the pod will be deleted by the addon manager.
This will trigger a pre-stop hook which will revert the config.toml to
it's original state and restart containerd.
2018-12-07 15:27:22 -08:00
Thomas Strömberg ad415e252d
Merge pull request #3401 from tstromberg/cherry-2f81d
Add apiserver check to "status", and block "start" until it's healthy.
2018-12-07 15:20:07 -08:00
priyawadhwa 034046e931 Add integration test to make sure minikube starts and stops with cont… (#3394)
* Add integration test to make sure minikube starts and stops with containerd
* Skip testing containerd if using none driver
2018-12-05 10:23:36 -08:00
Thomas Stromberg a9ad38cb82 MinikubeStatus->Host 2018-12-05 10:21:29 -08:00
Thomas Stromberg a402c11057 Remove check for obsolete kube-dns label & validate kubernetes.default rather than localhost 2018-12-04 12:46:59 -08:00
Nicholas Goozeff 919c9d9d36 Remove extra debug logging for mount command. 2018-11-28 15:45:25 +11:00
Balint Pato 47579273d8
even longer timeout + timeout error is retriable now (#3370)
* even longer timeout + timeout error is retriable now
* fix for debugging when tunnel test has issues
2018-11-27 13:58:26 -08:00
Thomas Strömberg e0df20f294 Restrict TestDocker commands to 10 minutes of total runtime. (#3350)
* Restrict TestDocker commands to 10 minutes of total runtime.
* Hide unneccesarily scary delete error
2018-11-27 08:24:28 -08:00
Balint Pato 4b11d63da1
debugging improvements and flakiness reduction (#3363)
Small improvements to debugging and reducing integration test flakiness: 
* added logging to kubeadm init in the SSHExecutor
* increasing timeout for RBAC creation via the kubernetes client set 
* only log tunnel output to test logger
2018-11-26 10:18:28 -08:00
Balint Pato a681603daa
Fix `minikube tunnel` for hyperkit (#3349)
This change is a bit of a hack to make IP routing work over the virtio-net interface - it forces the virtio-net interface (bridge100) created by hyperkit/xhyve to reset via removing and readding the single member of the interface. Without this "reset" packets are just simply lost most of the time, despite a completely healthy IP route.

This error was also the reason for a large percentage of our integration test failures. While reducing the flakiness of tunnel related tests I also increased the timeout requirement and adding retries to the nginx request in TestTunnel.
2018-11-21 13:39:48 -08:00
Thomas Stromberg f0b358f2b4 Remove extra log statements 2018-11-13 12:42:00 -08:00
Nicholas Goozeff ff93c6e067 Fix bug in construction of mount command for testing.
Only check access time is set for windows OS.
2018-11-10 18:32:41 +11:00
Thomas Stromberg 8771eae0ae testDashboard: add timeout around reading URL from stdout.
This test typically takes <30s to execute, so 180s should leave plenty
of margin for error.
2018-11-07 16:40:45 -08:00
Thomas Stromberg 1b254773ef Call t.Parallel() after t.Skip() to avoid confusion while debugging. 2018-11-07 16:40:21 -08:00
Thomas Stromberg c9abdf46a7 Skip testTunnel on non-Windows platforms if route requires sudo password. 2018-11-07 16:39:28 -08:00
Nicholas Goozeff 14244b3645 Test cases for issue #3044 - timestamps of mounted files incorrect with windows host. 2018-10-31 05:42:27 +01:00
Thomas Strömberg 2ec03ebf61
Merge pull request #3260 from tstromberg/disable-mount-osx
Disable mount tests in Darwin to workaround panic: timeout bug
2018-10-19 17:03:08 -07:00
Thomas Strömberg 2621bb3a27
Merge pull request #3187 from tstromberg/consistent_err_formatting
Globally replace %s format directives with %v for error strings
2018-10-19 16:44:46 -07:00
Thomas Strömberg 43cdeb9242
Merge pull request #3219 from tstromberg/docker-env
Fix broken TestFunctional/EnvVars test when run under non-bash shell.
2018-10-19 16:19:54 -07:00
Thomas Stromberg 88ab68305b Add runtime import for Darwin check. 2018-10-19 16:16:32 -07:00
Thomas Stromberg 1f968bc893 More merge conflicts. 2018-10-19 14:20:17 -07:00
Thomas Stromberg 13e580b588 Fix merge breakage. 2018-10-19 14:16:03 -07:00
Thomas Stromberg 72e596507a Merge branch 'master' into consistent_err_formatting 2018-10-19 14:08:35 -07:00
Balint Pato ae9f4b20c7
minikube tunnel (#3015)
This commit introduces a new command, `minikube tunnel`, a LoadBalancer emulator functionality, that must be run with root permissions.

This command:

* Establishes networking routes from the host into the VM for all IP ranges used by Kubernetes.
* Enables a cluster controller that allocates IPs to services external `LoadBalancer` IPs.
* Cleans up routes and IPs when stopped (Ctrl+C), when `minikube` stops, and when `minikube tunnel` is ran with the `--cleanup` flag
2018-10-18 11:01:47 -07:00
Thomas Stromberg f20bf4d3b2 Disable mount tests in Darwin to workaround panic: timedout bug
These tests reliably cause a "panic: timed out" condition due to
hitherto unknown reasons. See issue #3200 for context.

dlorenc mentioned that this test never worked, so when I re-enabled it
recently for all platforms in af61bf790c,
it introduced a persistent test failure for darwin.

I'll leave issue #3200 open until we are able to re-enable this test.
2018-10-17 14:58:40 -07:00
Thomas Stromberg 07015bf43c Improve wording. 2018-10-05 14:02:04 -07:00
Thomas Stromberg 3d3926fd73 Remove scary looking log messages that distract from real failures. 2018-10-05 14:01:26 -07:00
Thomas Stromberg 633bd80dcb Merge branch 'master' into docker-env 2018-10-05 11:59:19 -07:00
Thomas Stromberg dc6d1bab8d Merge branch 'master' into dashboard_on_demand 2018-10-04 13:38:49 -07:00
Fernando Diaz 2ebdf5e1eb Enhance the Ingress Controller Addon (#3099)
- Updates Ingress-Controller Version to 0.19.0
- Adds Service Account for Ingress-Controller
- Adds Support for Prometheus
- Fixes bug with TCP/UDP ConfigMaps not Loading
- Adds more resource limits to default-backend
- Use new ingress class name
- Use app.kubernetes.io/xxxxxxxxxxx labels
2018-10-04 16:13:53 -04:00
Thomas Stromberg 534325e88f Use %v for errors instead of %s 2018-10-03 21:57:17 -07:00
Thomas Stromberg 57054acfb6 Add missing reference to cmd. 2018-10-03 15:12:40 -07:00
Thomas Stromberg c079bb1934 Update integration tests to handle newly persistant dashboard. 2018-10-03 15:06:30 -07:00
Thomas Stromberg df54c6a5b4 Use "kubectl proxy" instead of a NodePort to expose the dashboard.
This provides an additional level of security, by enforcing host checking, applying port randomization, and requiring explicit user intent to expose the service to the host.
2018-10-02 22:25:45 -07:00
Thomas Strömberg 4b1ee9cffb
Merge branch 'master' into directives 2018-09-28 19:20:49 -07:00
Thomas Stromberg 5ea3ef88ec Revert "Remove lint issues from integration tests, mostly by adding error"
This reverts commit af61bf790c.
2018-09-28 17:00:55 -07:00
Thomas Stromberg 3706b3b8ac Fix dangling format issues. 2018-09-28 16:48:37 -07:00
Thomas Stromberg 8540e3a038 Consistently use %v for formatting error messages. 2018-09-28 16:18:22 -07:00
Thomas Stromberg 055c8002b1 Replace %s format directives with %v for errors.
Previously we were mixed between the two forms. This commit picks %v,
which is consistent with the Kubernetes code base. They both effectively
do the same thing in this case, though %v works with any object, and %s
only with string objects.
2018-09-28 16:05:27 -07:00
Thomas Stromberg 6d93bd5ffe Wait for k8s-app=kube-dns pods to be Running before testing.
This effectively reverts 0a5efe156c - whose behavior was apparently correct. Both coredns and kubedns share k8s-app=kube-dns labels in our current environment.
2018-09-28 15:08:33 -07:00
Thomas Stromberg af61bf790c Remove lint issues from integration tests, mostly by adding error
handlers.
2018-09-28 11:57:48 -07:00
Thomas Stromberg 349ea5a06a Fix broken TestFunctional/EnvVars test when run under non-bash shell.
Make future failures to this test easier to debug. Here's an example of
the test failure I ran into:

    --- FAIL: TestFunctional/EnvVars (0.58s)
        cluster_env_test.go:36: SetEnvFromEnvCmdOutput: Error: No variables were parsed from docker-env output:
            set -gx DOCKER_TLS_VERIFY "1";
            set -gx DOCKER_HOST "tcp://192.168.39.199:2376";
            set -gx DOCKER_CERT_PATH "/usr/local/google/home/tstromberg/.minikube/certs";
            set -gx DOCKER_API_VERSION "1.35";
            # Run this command to configure your shell:
            # eval (minikube docker-env)
2018-09-26 17:53:42 -07:00
Thomas Stromberg 45379c61c2 Fix T.Log call containing a formatting directive. 2018-09-26 15:38:18 -07:00
dlorenc 86f44ad4ff Manual changes for go-containerregistry update. 2018-08-22 20:24:46 -05:00
dlorenc 20b4020019 Also disable persistence test. 2018-08-21 09:12:40 -07:00
dlorenc 0a5efe156c Don't look for DNS by name. It might be coredns or kubedns.
Signed-off-by: dlorenc <dlorenc@google.com>
2018-08-21 09:12:40 -07:00
dlorenc 232080ae0c Remove some more vendored k8s. 2018-07-26 08:23:21 -07:00
Aaron Prindle a4606583e4 remove all localkube references from code, change /var/lib/localkube to /var/lib/minikube 2018-07-24 12:36:42 -07:00
dlorenc 80e934b845 Fix e2e test compilation.
Signed-off-by: dlorenc <dlorenc@google.com>
2018-06-13 14:13:38 -07:00
dlorenc a2218d2e7e Add two more kubeadm preflight ignores to make e2e tests pass. 2018-06-12 13:48:29 -07:00
dlorenc 6b4c545a0f Deflake the dashboard test.
This was a bit overkill.
2018-06-08 10:22:43 -07:00
kairen d7c90bc3e5 Fix integration test for Ingress 2018-05-08 11:27:26 +02:00
Yongkun Anfernee Gui c07258b45a Fix more permissions 2018-02-09 14:32:53 -08:00
kairen 08f4677511 Change kubernetes-dashboard from RC to Deployment 2018-01-10 02:15:07 +08:00
dlorenc 030a4c747f Manual changes for 1.9 update. 2017-12-21 14:15:48 -08:00