Commit Graph

888 Commits (cd3eea43db361e04b7c22e3e02b617f8247b6631)

Author SHA1 Message Date
Alex Robinson 0188e9af8c Sleep before deleting the cluster to give the controller manager time to
delete any cloudprovider resources still around from the last test.
2015-05-26 20:11:03 +00:00
Wojciech Tyczynski b2280db724 Deep-copy functions autogeneration. 2015-05-26 21:16:26 +02:00
Eric Paris d8187e26d3 Fix build with --use_go_build (e2e.test failure)
hack/build-go.sh --use_go_build would fail because e2e.test was not being
excluded from the set of things that we were "go build"ing

Instead of walking all binaries, only walk static and nonstatic
```
$ hack/build-go.sh
+++ [0524 18:09:51] Building go targets for linux/amd64:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/kubelet
    cmd/hyperkube
    cmd/kubernetes
    plugin/cmd/kube-scheduler
    cmd/kubectl
    cmd/integration
    cmd/gendocs
    cmd/genman
    cmd/genbashcomp
    examples/k8petstore/web-server
    github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
+++ [0524 18:09:51] +++ Warning: stdlib pkg with cgo flag not found.
+++ [0524 18:09:51] +++ Warning: stdlib pkg cannot be rebuilt since /usr/lib/golang/pkg is not writable by eparis
+++ [0524 18:09:51] +++ Warning: Make /usr/lib/golang/pkg writable for eparis for a one-time stdlib install, Or
+++ [0524 18:09:51] +++ Warning: Rebuild stdlib using the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std'
+++ [0524 18:09:51] +++ Falling back to go build, which is slower
    **************can't load package: package github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test: cannot find package "github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test" in any of:
    /usr/lib/golang/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOROOT)
    /storage/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOPATH)
    /storage/kubernetes/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test
!!! Error in /storage/kubernetes/hack/lib/golang.sh:339
  'go build -o "${outfile}" "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${binary}"' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:339 kube::golang::build_binaries_for_platform(...)
  2: /storage/kubernetes/hack/lib/golang.sh:488 kube::golang::build_binaries(...)
  3: hack/build-go.sh:26 main(...)
Exiting with status 1
!!! Error in /storage/kubernetes/hack/lib/golang.sh:406
  '( kube::golang::setup_env; local version_ldflags; version_ldflags=$(kube::version::ldflags); local host_platform; host_platform=$(kube::golang::host_platform); local goflags; eval "goflags=(${KUBE_GOFLAGS:-})"; local use_go_build; local -a targets=(); local arg; for arg in "$@";
do
    if [[ "${arg}" == "--use_go_build" ]]; then
        use_go_build=true;
    else
        if [[ "${arg}" == -* ]]; then
            goflags+=("${arg}");
        else
            targets+=("${arg}");
        fi;
    fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
    targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}"); if [[ ${#platforms[@]} -eq 0 ]]; then
    platforms=("${host_platform}");
fi; local binaries; binaries=($(kube::golang::binaries_from_targets "${targets[@]}")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then
    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -gt ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
        kube::log::status "Multiple platforms requested and available ${gigs}G > threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
    else
        kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
    fi;
fi; if [[ "${parallel}" == "true" ]]; then
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
    do
        ( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform//\//_}.build" &
    done; local fails=0; for job in $(jobs -p);
    do
        wait ${job} || let "fails+=1";
    done; for platform in "${platforms[@]}";
    do
        cat "/tmp//${platform//\//_}.build";
    done; exit ${fails};
else
    for platform in "${platforms[@]}";
    do
        kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
    done;
fi )' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:406 kube::golang::build_binaries(...)
  2: hack/build-go.sh:26 main(...)
Exiting with status 1
```
2015-05-24 19:16:26 -04:00
Quinton Hoole b8ca74ab66 Don't clobber GINKGO_TEST_ARGS in hack/jenkins/e2e.go 2015-05-22 14:54:05 -07:00
Dawn Chen cc6a31354e Merge pull request #8169 from kargakis/expose-use-resource-builder
expose: Use resource builder
2015-05-22 12:29:24 -07:00
Jerzy Szczepkowski ef965a60f2 Implementation of e2e test that resizes cluster (works on GCE). 2015-05-22 02:59:25 +02:00
Dawn Chen b33c4259f8 Merge pull request #8566 from markturansky/generator_godep
Added GOPATH vars and godep to generator script
2015-05-21 09:34:12 -07:00
kargakis 30958f892d expose: Use resource builder
Plus:
* Rename flag --service-name to --name
* Some refactoring
2015-05-20 23:55:07 +02:00
Wojciech Tyczynski 2df11cea32 Automatically generate conversions 2015-05-20 17:11:18 +02:00
markturansky 10258c46d7 Added GOPATH vars and godep to generator script 2015-05-20 10:56:54 -04:00
Jeff Grafton e968b6be81 Merge pull request #8442 from mbforbes/e2ePodsReady
Ensure pods both running and ready before starting e2e tests
2015-05-19 13:40:08 -07:00
Tim Hockin 97abc19810 Merge pull request #8299 from thockin/import-names
rename imported pkgs for readability
2015-05-19 12:01:57 -07:00
Tim Hockin 76a0a7dff2 Shush minor stdout noise on builds 2015-05-19 11:24:44 -07:00
Tim Hockin 70c94fad6d Don't rename api imports in conversions 2015-05-19 11:21:21 -07:00
Max Forbes 1da46ca3d0 Ensure pods both running and ready before starting e2e tests 2015-05-19 10:53:02 -07:00
Jeff Grafton 90f61f3005 Change into the output directory before running go test -c. 2015-05-19 10:04:27 -07:00
Jeff Grafton bf1de72f4a Revert "Revert "Use native Ginkgo test runner instead of cmd/e2e (attempt N)""
This reverts commit f4bb6aa37d.
2015-05-19 09:13:08 -07:00
Quinton Hoole f4bb6aa37d Revert "Use native Ginkgo test runner instead of cmd/e2e (attempt N)" 2015-05-18 21:04:26 -07:00
Nikhil Jindal 0a6007b299 Merge pull request #8429 from jackgr/master
Fix portability bugs in hack/local-up-cluster.sh
2015-05-18 18:17:47 -07:00
Tim Hockin 2307350d1b Merge pull request #8443 from wojtek-t/conversion_improvements
Script for regenerate auto-generated conversions.
2015-05-18 17:24:08 -07:00
Wojciech Tyczynski 9a93206774 Script for automatically generate conversions. 2015-05-19 02:17:58 +02:00
Daniel Smith 5e056f119d Merge pull request #6694 from bprashanth/bench
Add a simple master benchmark and a wrapper to run it.
2015-05-18 14:42:24 -07:00
jackgr 87a26e2fd2 Fixes portability issues in cleanup() that cause the pid expansion to fail when host_os=darwin by replacing ps --ppid and ps --pid with pgrep -P and ps -p, and by suppressing header line in output with ps -o pid=. 2015-05-18 12:14:21 -07:00
Jeff Grafton 35c4b92e92 Make e2e compatible with Go 1.3 and OS X.
Go 1.4 added the -o flag to the "go test" command as well as support for
the TestMain() function, so we must work around these not existing in
Go 1.3.

The version of readlink on OS X does not have the -f flag - so we'll
just skip canonicalizing the path.
2015-05-18 12:11:33 -07:00
Jeff Grafton b79fae5d71 Revert "Revert "Once again, use native Ginkgo test runner instead of cmd/e2e.""
This reverts commit 67da1ac0c8.
2015-05-18 11:39:21 -07:00
Victor Marmol d431e98604 Merge pull request #8234 from nak3/terminate-child-process-local-up-cluster
Ensuring that we never call kill with empty arguments in local-cluster-up
2015-05-18 08:40:41 -07:00
Paul Morie 3b8e4d97a1 Run tests for third-party code 2015-05-16 16:52:23 -04:00
Jeff Lowdermilk 553f9f822b Add ga-beacon analytics to gendocs scripts
hack/run-gendocs.sh puts ga-beacon analytics link into all md files,
hack/verify-gendocs.sh verifies presence of link.
2015-05-15 18:56:38 -07:00
Daniel Smith cf337051e0 Merge pull request #7819 from nikhiljindal/etcdTranslation
Adding a script to update etcd objects as per the latest API Version
2015-05-15 18:28:36 -07:00
Prashanth Balasubramanian 4200033c0a Add a simple master benchmark and a wrapper to run it. 2015-05-15 17:30:17 -07:00
Jeff Grafton 67da1ac0c8 Revert "Once again, use native Ginkgo test runner instead of cmd/e2e."
This change broke compilation on go 1.3 and running e2e tests on OS X.

This reverts commit 86b023fdd6.
2015-05-15 16:41:55 -07:00
nikhiljindal fa9f864782 Adding a script to update etcd objects 2015-05-15 16:20:35 -07:00
Kenjiro Nakayama 4c859c7e35 Ensuring that we never call kill with empty arguments in local-cluster-up 2015-05-16 07:50:31 +09:00
Quinton Hoole c4fa78509d Merge pull request #7653 from ixdy/native-ginkgo-runner
Once again, use native Ginkgo test runner instead of cmd/e2e
2015-05-15 15:29:19 -07:00
David Oppenheimer b8c469e4f0 Merge pull request #8134 from nikhiljindal/test-go
Fixing the number of times our unit tests are run
2015-05-15 15:28:34 -07:00
Jeff Grafton 86b023fdd6 Once again, use native Ginkgo test runner instead of cmd/e2e.
This commit deletes cmd/e2e and updates hack/ginkgo-e2e.sh to use the
'ginkgo' command instead. All logic from cmd/e2e/e2e.go and
test/e2e/driver.go have been combined into the new file
test/e2e/e2e_test.go.

The test tarball now includes a built version of the test/e2e test
binary, which includes all tests under test/e2e. This was accomplished
by updating the build scripts to use 'go test -c' when a target name
ended with '.test', and adding a dependency on test/e2e/e2e.test.

This prebuilt test binary is passed to the Ginkgo runner in
hack/ginkgo-e2e.sh. In a future change, we can add support to run
Ginkgo against the source tree if it is available.

This change is generally intended to have no externally visible changes,
aside from the following caveats:
 - The -t/--tests flag has been removed
 - Calling cmd/e2e/e2e directly obviously won't work, but that was never
   intended to be supported anyway
 - If the GINKGO_PARALLEL environment variable is set to y, then ginkgo
   will run test specs in parallel. (Currently defaults to n, since some
   tests are broken in this mode.)

Additionally, several tests which made poor assumptions about cwd or
used testContext before it had been set have been fixed.
2015-05-15 11:54:53 -07:00
Rohit Jnagal bd0156c65a Merge pull request #8204 from jlowdermilk/gke-todos
Cleanup some todos for gke + rip out dead code
2015-05-14 10:30:24 -07:00
Yifan Gu 621dc01f42 Remove 'auth-path' in the arguments for kubelet.
Otherwise kubelet will fail to create the client because it can't
find the nonexisting auth file.
2015-05-13 16:26:22 -07:00
Paul Morie 8fcf470167 Merge pull request #8174 from liggitt/local_up_cluster
Fix key generation in local-up-cluster.sh
2015-05-13 17:33:25 -04:00
Jeff Lowdermilk 3f3760a14a Cleanup some todos for gke + rip out dead AuthConfig code 2015-05-13 13:54:02 -07:00
Tim Hockin 8e7970f2a1 mkdir -p in doc generation 2015-05-13 12:50:25 -07:00
nikhiljindal 0e9d7d1451 Fixing the number of times our unit tests are run 2015-05-13 09:56:13 -07:00
Jordan Liggitt b552503c07 Fix key generation in local-up-cluster.sh 2015-05-13 10:04:40 -04:00
Robert Bailey c47b9178b4 Replace the auth config file with a kubeconfig file when
starting the kubelet on GCE.
2015-05-13 01:03:28 -07:00
Nikhil Jindal d75bd8bf2a Merge pull request #7101 from liggitt/service_account
ServiceAccounts
2015-05-12 10:23:41 -07:00
Max Forbes 579aed4161 Add zone to jenkins version-getting call. 2015-05-12 09:23:41 -07:00
Max Forbes a161800e13 Allow Jenkins to get the version from the GKE server. 2015-05-11 17:31:29 -07:00
Jordan Liggitt 7e14a80f63 ServiceAccount admission plugin 2015-05-11 17:18:06 -04:00
Jordan Liggitt db1f0dc906 JWT token generation/verification 2015-05-11 17:18:06 -04:00
saadali 94643ce6c9 Modify Jenkins E2E to not fetch/unpack Kuberenetes, when deployment is
disabled,
2015-05-11 12:31:31 -07:00
Nikhil Jindal 3d8f94ed59 Merge pull request #8040 from nak3/terminate-child-process-local-up-cluster
Terminate child process by cleanup() in local-up-cluster.sh
2015-05-11 10:11:28 -07:00
Jeff Lowdermilk 6523d18130 Future proof GKE kubeconfig handling in e2e driver 2015-05-11 09:57:54 -07:00
Kenjiro Nakayama e39f29ca16 Terminate child process by cleanup() in local-up-cluster.sh 2015-05-11 00:07:22 +09:00
Shawn Smith ecce796ee8 Use Fatalf 2015-05-10 13:08:55 +09:00
Justin SB a442918d31 AWS: Don't try to copy gce_keys in jenkins e2e job
Should fix e2e builds.

For the AWS jenkins jobs, I've been using the secret plugin.
2015-05-09 08:55:35 -07:00
Max Forbes 590d3873ea Make jenkins e2e runs reuse one key, take two. 2015-05-08 15:52:56 -07:00
Zach Loafman c6400cab1f Revert "Make jenkins e2e runs reuse one SSH key." 2015-05-08 15:46:42 -07:00
Max Forbes 41cc8027ab Make jenkins e2e runs reuse one key. 2015-05-08 14:51:42 -07:00
saadali 7cc25842fa Add control variables to Jenkins E2E script 2015-05-07 17:01:25 -07:00
CJ Cullen fbd125e4e2 Remove restriction that cluster-cidr be a class-b 2015-05-06 15:01:13 -07:00
Paul Morie 5c3bf0b08f Remove unnecessary bind-mount from dockerized kubelet run 2015-05-06 15:38:17 -04:00
Paul Morie fa1d065595 Add ability to dockerize kubelet in local cluster 2015-05-06 09:36:52 -04:00
Zach Loafman 875e83a741 Revert "Revert "Security context - types, kubelet, admission"" 2015-05-05 16:02:13 -07:00
Zach Loafman f48904fd5e Revert "Security context - types, kubelet, admission" 2015-05-05 15:20:39 -07:00
Yifan Gu 102a2c4269 hack/local-up-cluster.sh: Add env to enable rkt in local cluster.
This makes testing rkt easier.
2015-05-05 14:07:10 -07:00
Paul Morie 1625e231dd Merge pull request #7343 from pweil-/security-context-types
Security context - types, kubelet, admission
2015-05-05 16:26:09 -04:00
Eric Paris 63e3366581 Merge pull request #7757 from nak3/build_genbashcomp_with_make_all
Add genbashcomp to KUBE_TEST_TARGETS
2015-05-05 13:47:11 -05:00
Paul Weil 982bf19c20 security context initial implementation - squash 2015-05-05 13:46:13 -04:00
Jeff Lowdermilk 87cdc3f032 Merge pull request #7672 from eparis/boilerplate-python
Check license boilerplate for python files
2015-05-05 09:23:36 -07:00
Jeff Lowdermilk c1ae69da14 Merge pull request #7705 from bprashanth/rollingupdate_2
Reliable updates in rollingupdate
2015-05-05 09:23:25 -07:00
Kenjiro Nakayama 4c9f2d89ba Add genbashcomp to KUBE_TEST_TARGETS 2015-05-05 16:42:23 +09:00
Eric Paris c9cd50dc49 Check python files for valid license boilerplate 2015-05-04 18:37:47 -04:00
Prashanth Balasubramanian faa65cbd20 More reliable updates in rollingupdate 2015-05-04 15:29:30 -07:00
Daniel Smith 838b59cb4d make benchmark able to run only specific packages 2015-05-04 14:28:37 -07:00
Clayton Coleman dd8184247e Merge pull request #7629 from caesarxuchao/new-fix-7260-7491
Change the order the different versions of API are registered
2015-05-04 15:01:59 -04:00
Jeff Lowdermilk dda0af07b3 Merge pull request #7654 from eparis/boilerplate-speedup
Boilerplate speedup
2015-05-04 09:46:21 -07:00
Wojciech Tyczynski 690c991415 Merge pull request #7692 from BenTheElder/e2e_fixes
Fix typo in e2e
2015-05-04 12:01:22 +02:00
Wojciech Tyczynski a7205b1fe9 Merge pull request #7685 from jayunit100/etcd-minor
(minor) Add pgrep debugging to etcd error
2015-05-04 11:21:02 +02:00
BenTheElder 129d7f8d26 Fix typo in e2e
Correct comment in e2e.go ’…at least 3 minions running’ -> ‘…at least minMinionCount
minions running’.
2015-05-04 04:42:07 -04:00
jayunit100 cdf068495a (minor) Add pgrep debugging to etcd error 2015-05-03 16:59:45 +00:00
Eric Paris f4d0b8df3a Do all boilerplate checks in 1 python call
It's just a little bit faster.....

BEFORE:
$ time hack/verify-boilerplate.sh

real	0m9.378s
user	0m3.405s
sys	0m13.906s

AFTER:
$ time hack/verify-boilerplate.sh

real	0m0.181s
user	0m0.114s
sys	0m0.068s
2015-05-01 20:46:57 -04:00
Chao Xu 4787c66214 Register the API versions to the DefaultRESTMapper in the order of preferred versions first.
This makes kubectl sends requests to URLs in the format defined by the latest API version.
2015-05-01 15:14:15 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Zach Loafman 230449f122 Merge pull request #7593 from ixdy/jenkins-godep
Build github.com/onsi/ginkgo/ginkgo as a part of the release
2015-05-01 14:10:31 -07:00
Jeff Grafton 1359125a4e Build github.com/onsi/ginkgo/ginkgo as a part of the release.
Additionally, add hack/lib to the testing tarball.
2015-05-01 11:29:11 -07:00
Jeff Lowdermilk ec9942e995 Merge pull request #7540 from bprashanth/rollingupdate
Fix rolling update --image
2015-05-01 10:07:46 -07:00
Alex Robinson 1bb76633da Make hack/test-go.sh friendlier to OS X bash by not using a -1 array index.
Without this, everytime I run test-go.sh I get the following error:
./hack/test-go.sh: line 215: apiVersions: bad array subscript
2015-04-30 14:56:02 -07:00
Quinton Hoole bfaf976df7 Revert "Use native Ginkgo test runner instead of cmd/e2e" 2015-04-30 13:45:46 -07:00
Quinton Hoole 3602884d32 Merge pull request #7462 from ixdy/native-ginkgo-runner
Use native Ginkgo test runner instead of cmd/e2e
2015-04-30 13:27:04 -07:00
Prashanth Balasubramanian c8ea0c27e9 Fix rollingupdate --image 2015-04-30 11:28:18 -07:00
CJ Cullen 615906ccca Fix parallel-e2e.sh to work on my macbook (bash v3.2) 2015-04-29 10:52:21 -07:00
Jeff Grafton 57750ccb51 Use native Ginkgo test runner instead of cmd/e2e.
This commit deletes cmd/e2e and updates hack/ginkgo-e2e.sh to use the
'ginkgo' command instead. All logic from cmd/e2e/e2e.go and
test/e2e/driver.go have been combined into the new file
test/e2e/e2e_test.go.

Additionally, several tests which made poor assumptions about cwd or
used testContext before it was set have been fixed.

This change is generally intended to have no externally visible changes,
aside from the following caveats:
- The -t/--tests flag has been removed
- Calling cmd/e2e/e2e directly obviously won't work, but that was never
  supported anyway
- If the GINKGO_PARALLEL environment variable is set to y, then ginkgo
  will run test specs in parallel. (Currently defaults to n, since some
  tests are broken in this mode.)
2015-04-28 18:42:37 -07:00
Alex Robinson 79b9b1b0ef Build hyperkube into a static binary. 2015-04-28 02:13:09 +00:00
Tim Hockin a3d45fada8 Change flags to use dashes in help 2015-04-27 15:11:03 -07:00
Daniel Smith 83093af8b0 Merge pull request #5707 from endocode/kbeecher/etcd_prefix
Adds ability to define a prefix for etcd paths
2015-04-27 13:37:43 -07:00
Karl Beecher a7623ca6cc Adds ability to define a prefix for etcd paths
The API server can be supplied (via a command line flag) with a custom
prefix that is prepended to etcd resources paths.

Refs: #3476
2015-04-24 12:12:39 +02:00
Prashanth Balasubramanian 080bc5b3dd Configurable log levels for integration tests. 2015-04-23 18:12:48 -07:00
David Oppenheimer e8b28c59c6 Merge pull request #7228 from jlowdermilk/describe-examples
Add examples for kubectl describe, make gendocs less spammy
2015-04-23 16:08:35 -07:00
Jeff Lowdermilk a8e2f6e9c8 Add examples for kubectl describe, and make gendocs less spammy
Makes hack/{run/verify}-gendocs.sh ignore generated-timestamp-only
changes so minor changes to kubectl don't have to touch the entire
set of md docs.
2015-04-23 14:53:10 -07:00
nikhiljindal 1e323d77bc Updating the guestbook example to v1beta3 2015-04-23 14:34:36 -07:00