Commit Graph

578 Commits (da9622a6d79ec1e9b05760538c853282b41d94a8)

Author SHA1 Message Date
Karl Beecher ecbb91cc08 Adds support for multiple resources to kubectl
You can specify multiple resources by name when using the delete, get
and stop commands.
2015-02-20 16:18:57 +01:00
Salvatore Dario Minonne b60dadae46 Adding resize command to hack/test.cmd.sh 2015-02-20 05:56:16 +01:00
Zach Loafman 7febce6321 Revert "Migrate the certs.sh e2e test to ginkgo" 2015-02-19 18:41:30 -08:00
Zach Loafman 2b5641deb8 Merge pull request #4574 from ixdy/travis-coveralls
Produce a combined coverage report when running Go unit tests, and use goveralls to report coverage results from Travis to Coveralls.io.
2015-02-19 18:04:52 -08:00
Jeff Grafton 26addee75b Produce a combined coverage report when running Go unit tests.
The Go coverage tool does not currently support recording a coverage
data profile across packages, so we must manually combine these coverage
profiles and use it to produce an HTML report when KUBE_COVER is
nonempty. The exact value of KUBE_COVER is now ignored; KUBE_COVERMODE
can be used to set the coverage mode from the default of "atomic".

Additionally, if KUBE_GOVERALLS_BIN is set, hack/test-go.sh will attempt
to report coverage results to Coveralls.io. This is intended to be used
with the Travis build.
2015-02-19 17:49:36 -08:00
Zach Loafman 597dedf762 Merge pull request #4551 from a-robinson/e2e
Migrate the certs.sh e2e test to ginkgo
2015-02-19 17:34:04 -08:00
Brendan Burns d9d5837510 Merge branch 'kubectl-man' of https://github.com/eparis/kubernetes into eparis-kubectl-man
Conflicts:
	docs/kubectl.md

    COMMIT_BLOCKED_ON_GENDOCS
2015-02-19 11:53:38 -08:00
Brendan Burns c9657cad04 Merge pull request #4319 from justinsb/aws_fixes
Fixes to get AWS tests to run
2015-02-18 22:43:46 -08:00
Brendan Burns 6e2b733d4b Fix update.sh if DOCKER_HUB_USER isn't defined. 2015-02-18 19:38:26 -08:00
Robert Bailey e0cc7b4138 Remove the numbered shell scripts from the live update example and the
update.sh e2e test. They were needlessly obfuscating the actual kubectl
commands being run.
2015-02-18 17:02:44 -08:00
Alex Robinson 94161a44ee Pass the GCE project, zone, and master name into e2e.go as flags. 2015-02-18 15:41:36 -08:00
Alex Robinson f946aa887b Migrate the certs.sh e2e test to ginkgo. Issue #4185. 2015-02-18 13:45:44 -08:00
Yu-Ju Hong 69318a118c Fix hack/verify-description.sh to actually surface the error 2015-02-18 12:56:46 -08:00
Jeff Grafton 502b95f045 Jenkins e2e tests: ignore test exit status.
Since Jenkins has hopefully been set up properly to read test failures
from junit*.xml files, only exit with a nonzero status when there are
infrastructure failures. If there are only test failures, the nonzero
exit status will be ignored.

Also, disable Ginkgo's colors to make the Jenkin console logs more
readable.
2015-02-18 11:32:41 -08:00
Jeff Grafton ef801875ab Add --test_args flag to hack/e2e.go.
Add a flag to allow passing options to the Ginkgo test runner, for
example to pass --ginkgo.focus to run only particular specs.
2015-02-17 17:40:32 -08:00
Alex Robinson 3043ae9144 Merge pull request #4492 from jlowdermilk/e2e
Cleanup resources after services/guestbook e2e tests.
2015-02-17 12:04:46 -08:00
CJ Cullen 47622092fd Merge pull request #4164 from tkulczynski/mig
Use Managed Instance Group for managing Nodes in GCE
2015-02-17 12:01:48 -08:00
Tomek Kulczynski bcadad2e2e Use Managed Instance Group instead of manually creating Nodes in GCE 2015-02-17 20:33:31 +01:00
Jeff Lowdermilk 8ad671b01e Cleanup resources after shell tests exit 2015-02-17 11:27:54 -08:00
Brian Grant 866135e52c Merge pull request #4436 from EricMountain-1A/noargs-kubectl-create-test-fix
Fix "kubectl create with no args" test to verify exit code
2015-02-17 10:31:00 -08:00
Brian Grant f3ec56bba6 Merge pull request #4437 from filbranden/hack_e2e_simplify_cmd_exec
Simplify usage of os/exec
2015-02-17 09:59:05 -08:00
Brian Grant e1b07efd36 Merge pull request #4450 from mikedanese/update-fix
fix error where we can't use kubectl update patch
2015-02-17 09:58:18 -08:00
Brian Grant 876d651737 Merge pull request #4395 from smarterclayton/split_naming
Fix cross-namespace LIST and WATCH
2015-02-17 09:40:09 -08:00
Clayton Coleman 0e07e61a53 Merge pull request #4381 from sdminonne/bug_fix
kubectl delete resource : remove all resources
2015-02-17 12:25:56 -05:00
Clayton Coleman 9175082a1c Split naming behavior out into objects that are derived from the request
Fix bug with cross namespace queries not being possible.  Ensure selflink
is set on lists correctly.
2015-02-16 00:23:38 -05:00
Mike Danese 9f9153256d fix error where we can't use patch and add cmd-test for patch and file
update
2015-02-15 10:43:35 -08:00
Filipe Brandenburger 70d37800b7 Simplify usage of os/exec
For now, keep the finishRunning() wrapper but use a straight cmd.Run()
call instead of the convoluted goroutine trying to catch signals.

It turns out that Unix process group handling is enough to interrupt
pending processes when stopping the run with something like a Ctrl+C
which should be enough.

Tested:
- Full e2e run with hack/e2e-test.sh, two tests failed but looks like
  they've been failing before this change.
- Started a hack/e2e.go -v -build and interrupted it with Ctrl+C,
  confirmed that build-release.sh was killed in the process.
2015-02-13 14:53:42 -08:00
Eric Mountain b639f6ece4 Fix "kubectl create with no args" test to verify exit code instead of evaluating (empty) stdout of the command. 2015-02-13 23:18:24 +01:00
Jeff Lowdermilk aa32f1b2ce Retry #4337: Make gce kubeconfig context include project 2015-02-13 13:31:50 -08:00
Salvatore Dario Minonne fda17c1b7a kubectl delete resource : remove all resources 2015-02-13 18:25:41 +01:00
Jeff Lowdermilk 61cc821506 Make local clusters work painlessly with kubeconfig 2015-02-12 16:30:41 -08:00
Brendan Burns 8b66b3f1da Merge pull request #4400 from erictune/no_port_conflict
Make cleanup of local cluster more robust.
2015-02-12 16:16:54 -08:00
Eric Paris a6beb2e7df Autogenerate md documentation for kubectl
This does away with the giant dump from cobra for kubectl and instead
generates md files which contain similar information, but one per verb.
This might work well as part of the cobra project, instead of doing it
in kube, but this gets us nice, linked, documentation right now.  If
people like it, I will try to get something similar into cobra.
2015-02-12 19:08:57 -05:00
Eric Paris 8e64be1c66 Add godeps for man page autogeneration 2015-02-12 18:38:25 -05:00
Eric Tune e82b97d237 Make cleanup of local cluster more robust.
Try to cleanup if there is a failure in script at any point.
Handle undefined vars in cleanup.
Wait longer for apiserver.
Exit if apiserver doesn't come up.
2015-02-12 14:29:55 -08:00
Jerzy Szczepkowski f94da1e6aa Initial implementation of kube-dump.sh - script which dumps state of Kubernetes cluster for debugging. Tested on GCE only. This is initial attempt to fix #3500. 2015-02-12 21:48:34 +01:00
Filipe Brandenburger f9a4471eca Merge pull request #4356 from filbranden/hack_e2e_clustersize_output
Simplify ValidateClusterSize() to use cmd.Output() directly
2015-02-11 16:55:30 -08:00
roberthbailey 2ed888592b Merge pull request #4351 from rajatchopra/master
democratize restart-apiserver method across clouds
2015-02-11 15:23:06 -08:00
Filipe Brandenburger 43543faaa7 Simplify ValidateClusterSize() to use cmd.Output() directly
This is a first step towards getting rid of finishRunningWithOutputs and
using the native os/exec methods directly where possible.
2015-02-11 15:02:24 -08:00
Rajat Chopra 56462c020a democratize restart-apiserver method across clouds 2015-02-11 13:44:43 -08:00
Zach Loafman a08e04dd68 Unpatch Jenkins now that #4177 is fixed
And actually, make it more better: Go ahead and tear down the cluster
even when tests fail, but (hopefully) relay the test exit status
correctly. This fails if there's a double error (if -down *also*
fails, we'll fail due to errexit), but either way is a build failure,
and this means that the teardown of a test failure build isn't getting
charged to the next run.
2015-02-11 13:42:14 -08:00
Filipe Brandenburger 55e8357c0f Merge pull request #4339 from zmerlynn/issue_4177
Fix hack/e2e.go exit status for -test
2015-02-11 13:21:37 -08:00
Zach Loafman f08f7e6972 Clean up output handling in hack/e2e.go
Dovetail stdout/stderr and remove escaping for TAP.
2015-02-11 13:12:48 -08:00
Zach Loafman ab38a78d70 Test() was mis-tracked. Change the variable name / handling here, and
also just make it unset so that if it's ever uninitialized it's
obvious.

Fixes #4177
2015-02-11 13:11:03 -08:00
Filipe Brandenburger 50a399fa30 Merge pull request #4341 from zmerlynn/i4340
Fix e2e-internal scripts for cluster-size and watch-events
2015-02-11 13:00:27 -08:00
Justin Santa Barbara cf470f7da4 Fixes to get AWS tests to run
They don't pass (yet), but they at least run!
2015-02-11 15:58:33 -05:00
Zach Loafman 9257b58e68 Fix e2e-internal scripts for cluster-size and watch-events
Fixes #4340
2015-02-11 12:46:31 -08:00
Brian Grant 20f7cbb87b Merge pull request #4291 from jlowdermilk/delete-kubecfg
Remove kubecfg, cleanup a few stray references.
2015-02-11 11:18:59 -08:00
roberthbailey e14ebcbea8 Merge pull request #4317 from justinsb/retry_logic_on_update
Fix polling in e2e-suite/update.sh: exit if we time out
2015-02-11 11:09:04 -08:00
Justin Santa Barbara 934bf51fe9 Fix polling in e2e-suite/update.sh: exit if we time out
Also reduce the number of iterations to 20
2015-02-11 13:56:27 -05:00
roberthbailey ed8237119f Merge pull request #4316 from justinsb/optional_args
Default value for ${@}, otherwise nounset causes failure
2015-02-11 10:41:10 -08:00
roberthbailey d68107be5e Merge pull request #4314 from justinsb/e2e_fixes
Remove stray r
2015-02-11 10:29:20 -08:00
Justin Santa Barbara 8cbd97d8bd Default value for ${@}, otherwise nounset causes failure 2015-02-11 12:39:06 -05:00
Justin Santa Barbara 7f142b0ee0 Add SKIP_PUSH_GCS env so we can run without a push to GCS 2015-02-11 12:36:40 -05:00
Justin Santa Barbara 4cf0e4c37f Remove stray r 2015-02-11 12:34:19 -05:00
Jeff Lowdermilk 197059b65d Remove kubecfg, cleanup a few stray references. 2015-02-10 16:43:12 -08:00
CJ Cullen a840c20939 Merge pull request #4158 from HackToday/master
Check curl before use it
2015-02-10 16:24:53 -08:00
Zach Loafman 2f231e0a2a Merge pull request #4268 from rajatchopra/master
Fix vagrant networking round 2
2015-02-10 07:39:48 -08:00
Rajat Chopra 1d12cad456 Fix vagrant networking. Include the master as part of overlay. And remove STP for efficiency.
fix e2e services for vagrant
Kubelet should wait on SDN to finish
Do not require docker on master for default clouds
2015-02-09 14:37:27 -08:00
Zach Loafman 6b8c332cd3 Revert "Fix vagrant networking" 2015-02-09 13:40:11 -08:00
Clayton Coleman d6069aa13a Merge pull request #4204 from rajatchopra/master
Fix vagrant networking
2015-02-09 14:52:13 -05:00
Clayton Coleman 4369e31b9d Integration tests should use 127.0.0.1 consistently 2015-02-09 14:30:31 -05:00
Brendan Burns e7a69504b4 Now that we automatically format GCE PD, remove formatting from the e2e test.
Also remove docs that note that it is necessary.
2015-02-06 20:30:58 -08:00
Rajat Chopra a9d8713db4 fix e2e services for vagrant 2015-02-06 18:34:27 -08:00
Filipe Brandenburger 162d7a00b3 Fix hack/e2e.go --ctl output
Export the KUBE_CONFIG_FILE environment variable pointing to the test
output when calling cluster/kubectl.sh directly.

Tested by running:
$ go run ./hack/e2e.go -v -ctl='version --match-server-version=false'
2015-02-06 14:36:35 -08:00
Filipe Brandenburger e63ccfff6c Reintroduce "Turn the hack/e2e.go commands into standalone scripts."
This reverts commit 2765660101,
which reverted a commit 0c7dce77dd, so
we're reintroducing the same code from that commit here.
2015-02-06 14:35:43 -08:00
Zach Loafman 2765660101 Revert "Turn the hack/e2e.go commands into standalone scripts." 2015-02-06 14:13:00 -08:00
Zach Loafman fc06acdd2b Merge pull request #4198 from filbranden/e2e_standalone_scripts
Turn the hack/e2e.go commands into standalone scripts.
2015-02-06 12:24:48 -08:00
Filipe Brandenburger 0c7dce77dd Turn the hack/e2e.go commands into standalone scripts.
This gets rid of bashWrap() and of running bash -s passing it a script
on stdin. Also get rid of most of the runBash*() helpers.

In particular, `go run hack/e2e.go -build` will now work when it needs
to ask whether it is OK to download a large docker image, it used to
fail since stdin was not available for the bash script using the `read`
command.

Tested by running a full `hack/e2e-test.sh` run including the build
stage without the docker image loaded, which used to fail before this
change.
2015-02-06 11:18:14 -08:00
Zach Loafman 134d332793 Move verbosity flag into driver.go, randomize specs
Before we get too many suites baked, I want to get spec randomization
in, just so no one accidentally thinks things flow from top to bottom.

The random seed is printed with every run:

Random Seed: 1423194521 - Will randomize all specs

and can be reproduced using --ginkgo.seed
2015-02-05 19:49:04 -08:00
Rajat Chopra b61ea1bbf1 Fix vagrant networking. Include the master as part of overlay. And remove STP for efficiency. 2015-02-05 17:41:27 -08:00
Kennan 903ed06774 Merge remote-tracking branch 'upstream/master' 2015-02-06 08:16:28 +08:00
Kennan 492e03697f Merge branch 'master' of https://github.com/HackToday/kubernetes 2015-02-06 08:10:49 +08:00
Kennan eaab84a414 Check curl before use it
This check can help user figure out what's the issue during
local cluster setup
2015-02-06 08:02:50 +08:00
rsokolowski df26b43a9d Fix hack/e2e-test.sh broken due to removed flag from hack/e2e.go 2015-02-05 23:56:43 +01:00
Brian Grant c1ca07338f Merge pull request #4149 from nikhiljindal/autoSwaggerSpec
Adding static swagger spec and a script to update it
2015-02-05 12:13:33 -08:00
nikhiljindal fe27529d7e Adding static swagger spec and a script to update it 2015-02-05 12:00:28 -08:00
Zach Loafman 49a1984e98 Breakfix for #4177, not a real solution 2015-02-05 11:24:45 -08:00
Zach Loafman c15595fdf7 Revert jenkins/e2e.sh back to 606b517a, minus -tap 2015-02-05 10:25:59 -08:00
Brendan Burns 8b25b43039 Merge pull request #4117 from wojtek-t/validate_docker_version
Check Docker version in Kubelet /healthz handler
2015-02-05 10:06:33 -08:00
Zach Loafman dad85ef4f1 Add more logging 2015-02-05 10:01:45 -08:00
Zach Loafman 0b456e40bf Fix jenkins/hack/e2e.sh, log errors better 2015-02-05 09:16:11 -08:00
Zach Loafman f21a25e7fc Add hack/ginkgo-e2e.sh to kubernetes-test.tgz 2015-02-05 08:06:50 -08:00
Zach Loafman bace7593d0 Enable ginkgo.v (console output is missing spec without it) 2015-02-05 07:24:05 -08:00
Zach Loafman 688f96cd33 Run shell tests under Ginkgo, changing all reporting to JUnit
* Add a test/e2e/shell.go that slurps up everything in hack/e2e-suite
and runs it as a bash test, borrowing all the code from hack/e2e.go.

* Rip out all the crap in hack/e2e.go that deal with multiple tests

* Move hack/e2e-suite/goe2e.sh to hack/ginkgo-e2e.sh so that it
doesn't get slurped up.
2015-02-05 07:24:05 -08:00
Kennan 222c714cf6 Check curl before use it
This check can help user figure out what's the issue during
local cluster setup
2015-02-05 16:31:07 +08:00
Filipe Brandenburger 7bb62cbfb3 Make e2e shell tests work standalone
Simply incorporate some of the boilerplate from hack/e2e.go into the
scripts in hack/e2e-suite.

Use environment variables with default values to allow overrides in
kubectl command line and to use a versioned package root.

Tested:
- Ran `go run hack/e2e.go -test` on a test cluster.
- Ran the test cases individually.
- Ran hack/e2e-suite/goe2e.sh -t Pods to confirm it takes arguments.
- Also fixed cluster/test-network.sh (which should be more and more irrelevant.)
2015-02-05 00:22:16 -08:00
Wojciech Tyczynski 524cdba101 Fix hack/test-cmd.sh test. 2015-02-05 01:58:26 +01:00
Clayton Coleman 449f9d915e Make hack/local-up-cluster.sh work again for etcd 2 2015-02-04 17:45:53 -05:00
Brendan Burns b3014e4360 Fix goe2e.sh (I hope) 2015-02-03 23:04:58 -08:00
Zach Loafman acbadc8ade Merge pull request #3991 from zmerlynn/hermetic_jenkins_build
Clean out dead docker containers and docker images every Jenkins build
2015-02-03 14:56:59 -08:00
Brendan Burns aa5a724f8d Merge pull request #4067 from jlowdermilk/verify-gendocs
Point to hack/run-gendocs.sh in verify-gendocs.sh error message.
2015-02-03 12:20:01 -08:00
Jeff Lowdermilk c6c46753fd Point to hack/run-gendocs.sh in verify-gendocs.sh error message. 2015-02-03 11:53:30 -08:00
Jeff Lowdermilk 890615d93e Replace kubecfg with kubectl in e2e tests 2015-02-03 11:43:55 -08:00
Satnam Singh 6d5c56b2a7 Merge pull request #3995 from filbranden/e2e_pod_update_remove_external_json
Convert load of api/examples/pod.json into native Go definition of the api.Pod
2015-02-02 11:37:19 -08:00
Filipe Brandenburger 5b6eee294e Merge pull request #3993 from satnam6502/services
Fix services.sh to swap out broken kubecfg calls
2015-01-30 15:48:16 -08:00
Filipe Brandenburger 1d981f9345 Convert load of api/examples/pod.json into native Go definition of the api.Pod
This is another step in removing external dependencies of the Go e2e tests.

Remove references to this file on list of files required to run e2e tests.

Also use an unique name for the pod, so that failure in cleanup of a
previous run should not break a new run with a name conflict.

Tested by running cmd/e2e -t TestPodUpdate against an API server in GCE.
2015-01-30 15:25:56 -08:00
Satnam Singh b7aa81ebc6 Fix services.sh to swap out broken kubectl calls 2015-01-30 15:22:39 -08:00
Zach Loafman 67c382b5f0 Clean out dead docker containers and docker images every Jenkins build
This will increase build times on Jenkins, but should make the build
times consistent and make them pull from sources every time versus
leftover artifacts. Also upping timeout. (Try to address recent
some aborted builds.)
2015-01-30 13:53:27 -08:00
Filipe Brandenburger a74fce5bd7 Convert load of test/e2e/pod.json into native Go definition of the api.Pod
This is another step in removing external dependencies of the Go e2e tests.

Also remove other references to this file.

Tested by running cmd/e2e -t TestKubeletSendsEvent against an API server in GCE.
2015-01-30 13:21:09 -08:00