Commit Graph

572 Commits (1e8bd6f060c79ca5d84e5c8918c6e400a984b87a)

Author SHA1 Message Date
Thomas Stromberg 35449f685e Merge remote-tracking branch 'upstream/master' 2019-02-14 16:21:31 -08:00
Thomas Stromberg 5d09d35302 Improve output strings when used by none driver 2019-02-14 16:21:21 -08:00
Thomas Stromberg c2194e191d Fix merge conflicts 2019-02-14 11:58:07 -08:00
Thomas Stromberg 4cfe77294d Fix style merge conflict 2019-02-14 11:25:42 -08:00
Thomas Strömberg 3714bbd787
Merge pull request #3659 from tstromberg/console
Clearer output when re-using VM's so that users know what they are waiting on
2019-02-14 11:03:50 -08:00
Thomas Stromberg 08da5fe3b5 Add pod logs to 'logs' command, show detected problems during minikube start 2019-02-13 21:29:20 -08:00
Thomas Stromberg 69f72ea991 Add exit.go, remove call to exit.Fail 2019-02-13 12:47:02 -08:00
Thomas Stromberg 5f65dc80fa Remove error uploads, consolidate fatal error handling into exit package 2019-02-13 12:37:44 -08:00
Thomas Stromberg 1c09ba2a48 Make the output clearer and less cluttered 2019-02-13 09:41:53 -08:00
Thomas Stromberg e74db39783 Issue a poweroff request before deleting a VM. Avoids HyperV hang 2019-02-13 09:21:58 -08:00
Yugo Horie 00aff6039b Fix to not execute clusterBootstrapper.Delete when clusterBootstrapper is nil #3662 2019-02-13 10:08:06 +09:00
Thomas Stromberg ade3515f4f Disable Stackdriver error reporting until we can clean up the interface 2019-02-12 14:33:38 -08:00
Thomas Stromberg 3454c83dcf Clearer output when re-using VM's so that users know what they are waiting on 2019-02-12 13:54:30 -08:00
Anders F Björklund 0a91040434 Add DeleteCluster to bootstrapper
This matches StartCluster, and is used to revert
the changes done to reset the VM machine state.

Even if it fails, continue to deleting the VM...
Make sure to handle the case of missing config.
2019-02-12 19:49:19 +01:00
Thomas Stromberg 0a5b64eeaf Improve text strings for existing VM's and setting cluster permissions 2019-02-11 19:28:23 -08:00
Thomas Stromberg 452054bf25 Implement PR comments 2019-02-11 15:01:34 -08:00
Thomas Stromberg deb31b4230 Pull upstream, sort out merge conflicts, use ParseBool 2019-02-11 13:56:45 -08:00
Anders F Björklund 73dd006813 Replace string comparison with class method 2019-02-09 20:59:26 +01:00
Anders F Björklund 78806674f3 Merge branch 'master' into defaults 2019-02-09 18:25:27 +01:00
Thomas Strömberg 6e1b9d030c
Merge pull request #953 from denji/parallels
machine: add parallels support
2019-02-08 15:39:43 -08:00
Thomas Stromberg 6c48048538 Merge from hell #2: refactor start.go because it's terrible 2019-02-08 13:37:29 -08:00
Thomas Stromberg ee8ddd60a8 Merge 2019-02-07 18:21:29 -08:00
Thomas Stromberg 0f11c4de8e Remove unnecessary break statement 2019-02-07 16:14:47 -08:00
Thomas Stromberg e6c59fa135 Add back accidentally removed status line 2019-02-07 15:40:43 -08:00
Thomas Stromberg 9f09f02e39 Address PR comments, make sure PullImages code path is exercised 2019-02-07 15:39:31 -08:00
Thomas Stromberg f2d6f45538 More console work 2019-02-07 14:56:29 -08:00
Thomas Stromberg d1b0d0470a Initial console implementation 2019-02-06 22:00:30 -08: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 6ff11e44a5 Remove default cni flags from the documentation 2019-02-05 20:05:05 +01:00
Anders F Björklund 0071a940a7 Need to check if changed, not the current value 2019-02-02 19:11:33 +01:00
Anders F Björklund 6e7fc9dbf5 Add cni default for alternative container runtimes
If using an alternative container runtime, and not having set
any other parameters already, default to cni plugin and config.
2019-02-02 18:36:46 +01:00
Anders F Björklund 1cb2ba06e1 Refactor: add variables for network configuration 2019-02-02 18:36:42 +01:00
Thomas Stromberg b19526ab6c minor de-linting: run gofmt, goimports, pre-allocate fields slice 2019-01-25 10:49:58 -08:00
Denis Denisov a1cd81bf1c machine: add parallels support 2019-01-25 10:31:26 +02:00
Thomas Strömberg b61207c233
Merge pull request #3391 from ivans3/logviewer-addon-pr7
Initial commit of logviewer addon
2019-01-24 16:00:29 -08:00
Thomas Strömberg ad2b762c51
Merge pull request #3286 from hidekazuna/fix_vm_driver_none
Fix to run sudo -E minikube start --vm-driver=none
2019-01-24 15:59:14 -08:00
Thomas Strömberg fd562f81b1
Merge pull request #3565 from twelvelabs/patch-1
Remove redundant newline in `minikube status`
2019-01-24 07:33:20 -08:00
Skip Baney 34aa0c6895
Remove redundant newline in `minikube status`
Both #3502 (which this commit reverts) and #3523 attempted to fix the same issue.
Keeping the change from the latter PR since it fixes it at the source template.
2019-01-21 10:54:25 -06:00
Anders F Björklund 3389344d51 Need to restart crio, after stopping containerd
If it fails to start up, it will never try again.
2019-01-20 17:06:37 +01:00
Anders F Björklund 2c0b7da11e Stop containerd from running, if it is not desired
Apparently some grpc services are conflicting with crio

"Failed to start streaming server: listen tcp 10.0.2.15:10010: bind: address already in use"
2019-01-20 17:02:36 +01:00
Thomas Strömberg 56f8142e24
Merge pull request #3194 from afbjorklund/crictl.yaml
Write /etc/crictl.yaml when starting
2019-01-17 10:34:06 -08:00
Thomas Strömberg f29c0cd329
Merge pull request #3533 from tstromberg/kubeadm-log-output
Improve failure output when kubeadm init fails
2019-01-17 10:33:23 -08:00
Anders F Björklund c563c4d1fb Write /etc/crictl.yaml when starting 2019-01-17 07:27:28 +01:00
Thomas Stromberg c2bf394378 Minor improvements to output and comments 2019-01-16 12:14:56 -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 Strömberg 303e26cd56
Merge pull request #3494 from knabben/reporterror-test
Adding more utils tests
2019-01-15 17:13:23 -08:00
Thomas Strömberg 8bc8816c9f
Merge pull request #3521 from nixpanic/addons/gluster
Add a storage-provisioner-gluster addon
2019-01-15 17:08:45 -08:00
Thomas Strömberg 7b32547cf6
Merge pull request #3108 from sebcworks/sebcworks-customapiserverport
Allow to specify api server port through CLI fix #2781
2019-01-15 16:43:42 -08:00
Thomas Stromberg 393d1af3c6 mention 'minikube logs' for debugging start failures 2019-01-15 16:37:28 -08:00
Thomas Stromberg bf02c016b3 Make failure prompt text more clear 2019-01-15 16:37:04 -08:00
Thomas Strömberg 0a58301e3e
Merge pull request #3502 from narendra2019/master
issue# 3499: minikube status missing newline at end of output
2019-01-14 13:24:31 -08:00
Thomas Stromberg 3223e044e4 apiserver health: try up to 5 minutes, add newline 2019-01-11 11:49:49 -08:00
Niels de Vos b85b6d5eeb addons: mark the last enabled storage provider as default
When a storage provider is enabled (storage-provisioner-glusterfile),
mark it "is-default" and set "is-default" to "false" in all other
StorageClasses.
2019-01-09 20:04:21 +01:00
Niels de Vos b0c7341373 addons: when enabling storage-provisioner-gluster, mark other SCs non-default
There can only be one StorageClass be marked as default. When the
storage-provisioner-gluster addon is enabled, users expect it to be the
default StorageClass.

Instead of removing the "is-default" annotation from the other
StorageClasses, set it to "false". This leaves only the "glusterfile"
StorageClass as "is-default".
2019-01-09 20:04:21 +01:00
Niels de Vos 3c3b7368f0 Add storage-provisioner-gluster addon
With this addon dynamic provisioning based on Gluster can be enabled:

    $ minikube addons enable storage-provisioner-gluster

This will deploy several pods in a new 'storage-gluster' namespace:

 - glusterfs, storage service with a 10GB sparse /srv/fake-disk.img
 - heketi, a smart Gluster volume manager
 - glusterfile-provisioner, external-storage provisioner

In addition, the StorageClass 'glusterfile' will be created. It is
currently not configured as default StorageClass, so PVCs need to refer
to the new StorageClass.
2019-01-09 20:04:21 +01:00
Narendra Kangralkar 68287a9497 issue# 3499: minikube status missing newline at end of output
Done code changes to display newline at the end of the status message
2019-01-04 22:13:33 +05:30
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
Amim Knabben 6762fb0096 Adding GetkubeConfig path test 2018-12-28 10:49:50 -02:00
Amim Knabben f948bf8136 Adding ReportError test and HTTP Test server reuse 2018-12-28 10:04:45 -02:00
Thomas Stromberg 1bd4b05bc8 Increase dashboard retry time from 30 seconds to 3 minutes 2018-12-21 14:14:36 -08:00
Thomas Stromberg f3d158198f Add helpful dashboard status messages to stderr 2018-12-21 12:00:43 -08:00
Thomas Stromberg dba0c0a0dc Disable dashboard by default 2018-12-21 11:49:20 -08:00
Thomas Strömberg ab64cb952e
Merge pull request #3479 from tstromberg/stop-retry
Make "stop" retry on failure.
2018-12-20 19:46:24 -08:00
Thomas Stromberg c250a3b9d9 Make "stop" retry on failure. 2018-12-20 13:19:53 -08:00
Balint Pato ed7031cbb3
Merge branch 'master' into logviewer-addon-pr7 2018-12-19 17:14:09 -08:00
Chris Eason c7e69fd257 Allow ServiceCIDR to be configured via 'service-cluster-ip-range' flag. 2018-12-18 12:17:33 -05:00
priyawadhwa 5d910e8937 Save old cluster config in memory before overwriting (#3450)
* Save old cluster config in memory before overwriting

In PR #3426, I changed "minikube start" to overwrite the cluster config earlier so that the container runtime could be extracted from it by the buildroot provisioner. This introduced a bug later on, where minikube expected to read the kubernetes version from theold config (which no longer existed, because the config was overwritten).

To fix this, I changed the code to store the old version of the config in memory before overwriting it.

This should fix #3447
2018-12-13 14:31:22 -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 ed8f7124a0 Only restart docker service if container runtime is docker (#3426)
* Only restart docker service if container runtime is docker

Only allow the buildroot provisioner to restart docker if the container
runtime is docker. This change should fix the bug in #3424, since now
docker will not be restarted if the container runtime is containerd.

* Added files to fix FileContent--proc-sys-net-bridge-bridge-nf-call-iptables precheck error

From this issue: https://github.com/kubernetes/kubeadm/issues/1062
these files need to be added to prevent this precheck error (which occurs when running any container runtime that isn't docker).

Also, save the machine config on the user's filesystem earlier so that the buildprovisioner can access it.
2018-12-07 12:08:59 -08:00
Thomas Stromberg 1ceb3e050b Make errors retriable 2018-12-03 21:07:39 -08:00
Thomas Stromberg d0cfb28b8e apiserver, not api-server 2018-12-03 20:32:48 -08:00
Thomas Stromberg eae6efdc85 Verify status before mounting 2018-12-03 20:29:02 -08:00
Thomas Stromberg cb3624dd08 Add apiserver health checks 2018-12-03 20:11:42 -08:00
Thomas Strömberg bc67a32a7b
Merge pull request #3332 from dlorenc/rmaddons
Remove both the CoreDNS and KubeDNS addons. Let Kubeadm install the c…
2018-12-03 17:15:06 -08:00
ivans3 b43b8ccd9d Initial commit of logviewer addon 2018-12-02 12:58:06 -08:00
Hidekazu Nakamura 2ef8ff9256 Fix sudo -E minikube start
sudo -E minikube start --vm-driver=none does not change directory
owner when CHANGE_MINIKUBE_NONE_USER=true.
This patch fixes to change directory owner when
CHANGE_MINIKUBE_NONE_USER=true.
2018-11-28 02:08:29 +00:00
Anders Björklund 57f4d9247e Only require docker for the docker runtime (#3303)
Closes #3295
2018-11-27 14:15:08 -08:00
Joey 41bd1de699 Implement a check to see if an ISO URL is valid (#3287)
* Implement a check to see if an ISO URL is valid

* Use strings.TrimPrefix instead of []rune casting for 'file://' prefix removal

* Handle file permissions error with a user-friendly message
2018-11-26 16:29:47 -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
dlorenc 2091f8c27a
Remove both the CoreDNS and KubeDNS addons. Let Kubeadm install the correct DNS addon. 2018-11-16 14:54:44 -08:00
priyawadhwa 77942bbf94 Restart containerd after stopping alternate runtimes (#3343)
After stopping any runtimes that aren't being used, if we're using
containerd then we need to restart it. This is because it competes with
cri-o to listen on port 10010, causing a necesary plugin to not be
installed. After stopping cri-o, we need to restart containerd so that
the plugin is installed.

I also added some preflight checks when using alternative runtimes.
kubeadm checks to make sure the Docker service is running, so I disabled
that. It also checks if a few ports are available; these are ports that
containerd uses, so I also added them to the ignore list.

This should finish the work started in #3211, which stopped alternative
runtimes but didn't restart containerd. I was able to run "minikube
start" with containerd locally with this change.
2018-11-16 11:48:24 -08:00
dlorenc 4e5623e4fa Fix error formatting 2018-11-15 16:36:30 -06:00
Anders Björklund b69fc99d62 Stop docker daemon, when running cri-o (#3211)
* Stop extra container runtimes, before bootstrapper

The minikube.iso starts every runtime, by default

* Disable docker-env output, if docker isn't running

Might be running an alternative container runtime
2018-11-14 16:43:07 -08:00
Anders Björklund 2ceec0d084 Add config parameter for the cri socket path (#3154)
* Add config parameter for the cri socket path

Closes #3153

* Remove stray newline, when not using criSocket

* Add the --cri-socket parameter to configuration

Also fix the syntax for CRI-O, adding unix://
2018-11-14 16:36:02 -08:00
Thomas Stromberg a9d7c41056 One last rune->byte switch 2018-11-09 15:16:36 -08:00
Thomas Stromberg 810a6c70ef Update strings to reflect that a byte is returned instead of a rune 2018-11-09 15:16:05 -08:00
Thomas Stromberg 81815182c7 Use io.ByteReader interface 2018-11-09 15:11:58 -08:00
Thomas Stromberg 9013a57e58 Timeout when reading host:port from older kubectl versions.
kubectl releases older than August 2017 don't include a newline, which
means there is effectively no hint that the output has completed. I
believe this is why tests have been failing on the macOS.

Should resolve test timeout panics such as #3203
2018-11-09 15:03:08 -08:00
Bartel Sielski dd196abe30 Remove newline at the start of zsh completion file
Signed-off-by: Bartel Sielski <bsielski@nalys-group.com>
2018-10-30 11:23:46 +01: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 fd0d46680e Respect the -p flag to set the appropriate profile. 2018-10-04 11:35:24 -07:00
Thomas Stromberg 534325e88f Use %v for errors instead of %s 2018-10-03 21:57:17 -07:00
Thomas Stromberg c079bb1934 Update integration tests to handle newly persistant dashboard. 2018-10-03 15:06:30 -07:00
Thomas Stromberg d38705a42b Fix overzealous replacement of namespace -> ns that broke URL generation 2018-10-03 13:58:25 -07:00
Thomas Stromberg 2956621c20 Add function comments, improve proxy stdout log message 2018-10-03 13:30:09 -07:00
Thomas Stromberg 4c35c505f6 Double HTTP wait time and make error messages more readable. 2018-10-03 13:22:36 -07:00
Thomas Stromberg ac6dacff4a Address lint issues resulting from the dashboard proxy refactor. 2018-10-03 13:14:47 -07:00