Commit Graph

363 Commits (8ee34ac322db46c9c7a0960c60d134bd1e412e48)

Author SHA1 Message Date
Matt Rickard 48fd6ecb65 Add localkube as a bootstrapper
Introduce the --bootstraper or -b flag that toggles the cluster
bootstrapper.  The default bootstrapper (and only bootstrapper at this
time) is localkube.

The bootstrapper interface contains all the functions needed to
bootstrap a kubernetes cluster.  It ingests a KubernetesConfig, which
contains all the configuration for the cluster, as well as a
CommandRunner, which is the interface upon which it will run commands
and transfer files to possibly remotely set up the cluster.

This moves the localkube functions out of cluster.go into their own
package at k8s.io/minikube/pkg/minikube/bootstrapper/localkube.
2017-08-28 13:23:41 -07:00
Matt Rickard 48b165808c Bring KVM driver in-tree
Add boilerplate

Review feedback
2017-08-28 11:52:35 -07:00
Matt Rickard 1052dda37a Move CalculateDiskSizeInMB to utils to use in kvm 2017-08-28 11:27:34 -07:00
hanks 5556ce9436 fix(config): make ARN of AWS role input optional 2017-08-25 15:38:08 +09:00
Matt Rickard 3a0d03f93b Merge pull request from r2d4/command-runner
Add CommandRunner interface
2017-08-24 15:07:51 -07:00
dlorenc e3d239929b Jenkins/Makefile targets. 2017-08-24 11:54:59 -07:00
dlorenc 28f9d5dc1a Initial hyperkit driver implementation. 2017-08-24 11:54:59 -07:00
Matt Rickard fd921b3997 Review feedback 2017-08-23 14:33:34 -07:00
Matt Rickard 7f558f1a11 Move tests over to use FakeCommandRunner 2017-08-23 14:33:34 -07:00
Matt Rickard 5a9ecbe672 Add CommandRunner interface
Two implementations, SSHRunner and ExecRunner allow commands to be run
either through SSH or os.Exec respectively.  This allows the cluster
bootstrappers to be unaware of how they are actually executing the
commands they need.  Copy and Remove functions provide a nice
convenience function for running commands that copy and remove files
respectively.
2017-08-23 14:33:34 -07:00
Matt Rickard 793739d46a Remove tests that called exit code 2017-08-22 11:05:59 -07:00
Matt Rickard 6008e1f14f Merge pull request from r2d4/return-error-code
Exit with non-zero code on error
2017-08-21 13:14:33 -07:00
Matt Rickard 56132b6183 Delete profile config on machine delete
Also, don't print out anything when a profile doesn't exist.
2017-08-20 22:47:14 -07:00
Matt Rickard 5692c2e59c Exit with non-zero code on error
We don't log it, since RootCmd.Execute() will already print it out.
2017-08-20 22:16:17 -07:00
Matt Rickard f19fab24b4 Rename localkube status to cluster status 2017-08-18 11:55:28 -07:00
Sunny e07eb01366 fix(cmd/start): prevent k8s version downgrades
- Create Config struct to store MachineConfig and KubernetesConfig as cluster
configuration.
- Write cluster configuration under $MINIKUBE_HOME/profiles/ directory
when a cluster is launched.
- Load the cluster configuration at `start` and compare the loaded k8s
version with the requested version. Prevent any version downgrade requests.
2017-08-11 18:29:34 +05:30
Matt Rickard 245c4a04de Merge pull request from r2d4/lint
go lint/vet fixes
2017-08-09 10:44:03 -07:00
Matt Rickard a02541d18b Add 'none' shell for docker-env output
This is for consumers who want the key/value output, but don't need the
shell directives.
2017-08-04 15:46:27 -07:00
Matt Rickard 5531a63b8d go lint/vet fixes 2017-08-04 13:42:10 -07:00
Matt Rickard 45eabf66eb Merge pull request from r2d4/etcd3
Use etcd embed package, switch apiserver to use etcdv3
2017-07-26 13:42:21 -07:00
Matt Rickard 90dc5c87c9 Don't default to kubenet network plugin
Hostports seem to require extra CNI configuration and the CNI hostport
plugin installed to work properly with kubenet.
2017-07-25 10:07:10 -07:00
Matt Rickard 5e5a0fb971 Merge pull request from darkowlzz/1683-delete-machine-profile
cmd/minikube: delete accept no arguments
2017-07-24 15:09:34 -07:00
dlorenc 24e08b7337 Fix the way 'minikube status' finds the kubecfg file. 2017-07-24 11:40:15 -07:00
Matt Rickard 8eaf471940 Merge pull request from r2d4/typo2
\t isn't escaped in ``
2017-07-24 11:21:25 -07:00
Aaron Prindle 29a7d7119a Merge pull request from Teddy-Schmitz/registry-creds-gcrurl
Add gcrurl env var to registry-creds addon deployment and configuration
2017-07-24 10:16:13 -07:00
Sunny 17ba029cba cmd/minikube: delete accept no arguments
This changeset makes the delete command to error out if any argument is passed
to it.
2017-07-22 18:13:19 +05:30
Matt Rickard ca4de62179 \t isn't escaped in `` 2017-07-21 14:27:49 -07:00
Aaron Prindle c4ab0947c5 Merge pull request from upmc-enterprises/registryCredsAWSRole
Add additional config options for registry-creds addon / Bump version
2017-07-20 15:20:30 -07:00
Matt Rickard afcee9a5fc Merge pull request from svanellewee/issue-1608-password-hiding-again
added AskForPasswordValue and 2 tests
2017-07-20 12:02:07 -07:00
Matt Rickard a682bbbfe0 Use embeded etcd package, switch to etcdv3 2017-07-20 11:39:04 -07:00
Aaron Prindle c98ac207ab Merge pull request from q3aiml/restore-mount-cmd
Restore mount command and unswap port and mountVersion
2017-07-20 10:21:09 -07:00
Andy Clayton d332a2b818 Restore mount command
This seems to have been a mistake in 6f42d58.
2017-07-19 19:26:20 -05:00
Matt Rickard 8175c17a00 Use kubenet, add ebtables support
Fixes 
2017-07-18 14:43:56 -07:00
Steve Sloka 8ba6f47876 Add additional config options for registry-creds addon / Bump version 2017-07-18 11:10:24 -04:00
Stephan van Ellewee ed5843714c added AskForPasswordValue and 2 tests 2017-07-17 21:56:19 +02:00
Aaron Prindle 6f42d583d2 Added msize and 9p-version flags to mount. Also changed their defaults to be more usable 2017-07-17 11:02:56 -07:00
Matt Rickard 8ad4ffe217 Change localkube 'show-version' flag
The k8s components are registering their flags on localkube, polluting
the flag namespace.  A 'version' flag was added, which conflicts with a
localkube flag.  Changing the name of this flag so that there is no
conflict.
2017-07-13 09:19:44 -07:00
dlorenc c5b57b0479 Manual changes for 1.7 update. 2017-07-13 09:16:43 -07:00
Matt Rickard b30bb20c20 Remove show-libmachine-logs, use-vendored-driver
These flags don't do anything anymore.

`show-libmachine-logs` behavior is triggered by the log level `--v`

`use-vendored-driver` was a feature flag and now we default to vendored
drivers when we can automatically.
2017-07-12 10:12:15 -07:00
Alessandro Pilotti 2298c931e7 Add message before waiting for the VM IP address
Retrieving the IP address depends on guest/host communication channels (e.g. KVP on Hyper-V) that might fail.
This commit adds a message that can help the user in troubleshooting potential issues.
2017-07-10 05:27:42 +03:00
dlorenc 11ce2369d2 Move kubecfg utils from minikube to util.
We'll need to also write a kubecfg inside the VM going forward as we
remove the InsecureServing path.
2017-07-05 17:25:36 -07:00
Matt Rickard 2bf1a3e323 Add start flag --disable-driver-mounts
Allows users to disable the filesystem mounts created by the xhyve and
virtualbox drivers.
2017-06-28 14:23:07 -07:00
Aaron Prindle 79b9e10054 Added wait and interval time flags to minikube service command 2017-06-25 13:07:01 -07:00
Travis Cline c5becb3607 Allow control of user and group ids for mount 2017-06-22 11:29:56 -07:00
Aaron Prindle 4822d3aa33 Fixed condition to print minikube none information 2017-06-20 15:43:18 -07:00
Aaron Prindle 6639b2d91b Removed systemd dependency from minikube, updated none driver to reflect this 2017-06-20 09:55:14 -07:00
Matthew Fisher 51cf8cf9a8 fix registry addon labels
In a last-minute fix, I accidentally changed the pod labels all to
the minikube add-on reconciliation mode label instead of the add-on
name. This is causing the registry service to be unable to forward
requests over to the pods due to mismatched label selectors.
2017-06-19 11:39:18 -07:00
Matthew Fisher 135a920d80 fixup default --insecure-registry CIDR address
The default CIDR should be 10.0.0.0/24 rather than 10.0.0.1.
Accidental off-by-one error. :)
2017-06-19 11:39:18 -07:00
Matt Rickard c978526a3f Merge pull request from bacongobbler/registry-addon
introduce the "registry" addon
2017-06-16 10:44:00 -07:00
Matthew Fisher 5e1db75db5 add registry addon
This addon installs a docker registry into the cluster.
2017-06-16 10:36:10 -07:00
Budh Ram Gurung 96cb95bdfd Fix typo, grammar, punctuations and formatting 2017-06-16 17:56:51 +05:30
Shane Ramey 2b88806330 use --dns-domain for k8s API server cert 2017-06-15 07:48:37 -07:00
Matt Rickard 6ee3a941a9 Correct NewAPIClient invocation
Two merges happened close to each other, the first changed the
signature of this function.
2017-06-14 11:13:04 -07:00
Aaron Prindle e524e8a9aa Merge pull request from abbytiz/update-context
Added update-context and kubeconfig to status
2017-06-14 10:45:15 -07:00
dlorenc 09f683bb1d More cleanup. 2017-06-14 09:45:09 -07:00
dlorenc 5b5442be11 Move more code into the local host implementation. 2017-06-14 09:45:09 -07:00
Abby Tisdale 577816311e Added update-context and kubeconfig to status. 2017-06-13 16:22:56 -07:00
Roland Schilter 94c7a7854a Fix typos in profile help 2017-06-12 17:18:21 +02:00
Aaron Prindle a7c2ff3e84 Merge pull request from aaron-prindle/minikube-no-vm
None driver
2017-05-26 15:22:01 -07:00
Aaron Prindle f4a8ece0ae Additional none driver changes 2017-05-26 13:33:26 -07:00
dlorenc d5e4d45718 Only validate the version if it's not default. 2017-05-26 12:56:59 -07:00
Aaron Prindle 88613090a9 Added none driver 2017-05-19 14:51:19 -07:00
Aaron Prindle 847b52d50f Fixed mount daemon to be off by default and to use different directories than the current mounts until they are turned off. 2017-05-19 14:00:18 -07:00
Aaron Prindle c9767886f6 Added mount daemon process that is starts/stops w/ minikube start/stop 2017-05-17 11:50:24 -07:00
Matt Rickard 4a81362d52 Merge pull request from r2d4/k8s-version-check
Validate k8s version before starting VM
2017-05-16 15:58:53 -07:00
Aaron Prindle 3cd1aeec1d Merge pull request from aaron-prindle/ssh-key-cmd
Added ssh-key cmd
2017-05-16 15:58:01 -07:00
Aaron Prindle d66bcb8af8 added way to find interface for vbox and ip flag to mount 2017-05-16 13:27:22 -07:00
Aaron Prindle 0e868644d9 Added ssh-key cmd 2017-05-15 09:15:47 -07:00
Budh Ram Gurung 22e0f23845 Consistent short description for commands 2017-05-13 08:29:48 +05:30
Matt Rickard 652c4c668d Validate k8s version before starting VM
Also, cache in memory localkube versions in multiple calls to the GCS
bucket.  These versions will not change during the life of the minikube
process once fetched and are used multiple times.
2017-05-12 15:07:15 -07:00
Aaron Prindle e91641c70c Changed --name to --profile and added minikube profile command 2017-05-08 10:09:11 -07:00
Teddy Schmitz 5f6511c73c Add gcrurl env var to addon deployment and configuration 2017-05-02 12:14:17 +08:00
dlorenc 61ec292451 Fix minikube flag parsing. ()
We can't use flags in init like this. They're not parsed yet.
2017-05-01 10:05:34 -07:00
Dale Hamel 94ef3d88b9 Add support for using raw disks with xhyve ()
* Add support for using raw disks with xhyve, default it to true

* Fix formatting issue

* Prefix disk-driver with xhyve to make it clear it is only for xhyve

* Add missing config
2017-04-25 10:51:43 -07:00
Aaron Prindle b1a69c653f Merge pull request from aaron-prindle/mount-interface
Fixed mount command to bind on specific VM ip address instead of all …
2017-04-24 15:34:22 -07:00
dlorenc c23dfba5d2 Update the addon manager. ()
This gets us closer to being able to disable the storage provisioner.
2017-04-24 10:36:02 -07:00
Aaron Prindle b4936d023f Fixed mount command to bind on specific VM ip address instead of all interfaces 2017-04-24 09:59:12 -07:00
dlorenc ca4f2914d1 Add order to localkube startup. ()
* Add order to localkube startup.

This adds a "ready" concept to localkube servers.

* Add unit tests.
2017-04-24 09:22:05 -07:00
dlorenc e620cf7e09 Properly respect WantKubectlDownloadMsg () 2017-04-21 13:54:30 -07:00
Matt Rickard 438db81d9a Set log levels in command prerun
If this is called in init, glog and viper haven't been properly set up
yet, so it does not trigger the logging output.
2017-04-21 11:41:30 -07:00
Aaron Prindle 4e00a5a9f4 Added check for kubectl on Windows as well 2017-04-20 11:44:59 -07:00
Aaron Prindle 0f0dfb65ab Merge pull request from aaron-prindle/multiple-vms
Added --name flag and MINIKUBE_NAME env var for vm machine name
2017-04-19 12:05:55 -07:00
Aaron Prindle 41c5ba7663 Merge pull request from aaron-prindle/mount-vm-path
Changed mount syntax to be host-path:vm-path
2017-04-19 12:03:22 -07:00
Aaron Prindle 1b79cfd566 Added --name flag and MINIKUBE_NAME env var for vm machine name 2017-04-19 11:37:40 -07:00
Aaron Prindle b3ad7539b1 Changed mount syntax to be host-path:vm-path 2017-04-19 10:15:04 -07:00
Wiiliam Chang 3b7615b45f Add the multi VM drive discription. 2017-04-14 09:12:29 +08:00
Everett Toews aa9f16bd87 Inform users which version of Kubernetes is starting ()
This can be very informative for users new to Kubernetes and minikube.
2017-04-11 07:45:30 -07:00
Aaron Prindle 447b3cb9f9 Merge pull request from aaron-prindle/no-minikube-dir
Removed .minikube folder creation from version command
2017-04-09 10:11:51 -07:00
Matt Rickard 09e8cce24d Merge pull request from r2d4/k8s-v1.6-rebase-1
Upgrade to k8s v1.6 as default version
2017-04-06 14:37:51 -07:00
Aaron Prindle 4b94b14459 Merge pull request from aaron-prindle/switch-mount
Update mount implementation, add mount integration tests, and check t…
2017-04-06 14:33:22 -07:00
Aaron Prindle fcc1bdedda Removed .minikube folder creation from version command 2017-04-06 14:01:16 -07:00
Aaron Prindle 8e801e3975 Update mount implementation, add mount integration tests, and check that path exists. 2017-04-06 13:39:25 -07:00
Aaron Prindle 49ab18a1ac Merge pull request from aaron-prindle/addon-configure-cmd
added minikube addons configure command to replace auto-prompting to …
2017-04-03 14:40:31 -07:00
Aaron Prindle 0e78712fd4 added minikube addons configure command to replace auto-prompting to make scripting addons possible 2017-04-03 11:50:21 -07:00
Aaron Prindle f475961cde Added --dns-domain flag to localkube 2017-04-03 10:25:25 -07:00
Matt Rickard b279d733ad Minikube changes for v1.6.0-beta.2 2017-03-31 13:24:03 -07:00
Matt Rickard 3b46c27b16 Minikube changes for v1.6.0-alpha.1 2017-03-31 13:23:59 -07:00
Matt Rickard 4b3459ed5b Merge pull request from r2d4/disable-default-provisioner
Disable the default provisioner addon
2017-03-29 10:11:03 -07:00
Matt Rickard 3ad0190d78 Merge pull request from r2d4/dedupe
Don't glog top level command error message
2017-03-28 21:09:18 -07:00
Aaron Prindle f5fd42ea4d Removed error reporting prompt from minikube delete 2017-03-27 10:34:06 -07:00