Commit Graph

129 Commits (27edaf84f1acd37c96936ccd1a643479a3d61a8c)

Author SHA1 Message Date
Saad Ali 489e75e073 Merge pull request #12202 from daizuozhuo/kubectl
add jsonpath to kubectl
2015-08-20 14:31:45 -07:00
Clayton Coleman 9267f829eb Update tests to prepare for graceful deletion
For cases where we want to immediately cleanup the pod, start using
gracePeriod 0 in test cases.
2015-08-19 22:20:29 -04:00
Dai Zuozhuo b61a905b19 add jsonpath to kubectl 2015-08-20 08:57:24 +08:00
Robert Bailey 08e6a43c1d Revert "Merge pull request #9165 from smarterclayton/graceful"
This reverts commit 4f856b595d, reversing
changes made to d78525a83b.

Conflicts:
	pkg/kubelet/status_manager.go
2015-08-18 17:34:49 -07:00
Clayton Coleman b842a7dd15 Revert "Revert "Gracefully delete pods from the Kubelet""
This reverts commit 98115facfd.
2015-08-18 08:57:02 -04:00
Mike Danese fa40ced8f8 move contrib/for-tests to test/images 2015-08-14 20:42:46 -07:00
CJ Cullen 9fdd793555 Merge pull request #11841 from eparis/commit-speed
Speedups for precommit hooks
2015-08-11 12:58:58 -07:00
Eric Paris bf9c3cd6ec Use cp instead of rsync in hack/verify-gendocs.sh
Instead of calling rsync over and over and over and over and over and
over and over and over and over (and probably over) use one `cp`

Before:
real	0m5.247s
user	0m2.294s
sys	0m1.300s

After:
real	0m2.260s
user	0m2.230s
sys	0m0.936s
2015-08-11 14:21:57 -04:00
Eric Paris 5aeebb4886 hack/lib/etcd: remove unused local var
It isn't used anywhere, why have it?
2015-08-11 14:20:38 -04:00
Alex Robinson 59c0fbb6a9 Merge pull request #12444 from thockin/nix-cmd-kubernetes
Remove old 'kubernetes' cmd
2015-08-10 16:19:35 -07:00
feihujiang 73b694e6c1 kubectl describe <kind> work with no arguments
Add describe_resource_assert to test describe <kind> with no object arg
2015-08-10 14:08:38 +08:00
Tim Hockin bef7c99619 Remove old 'kubernetes' cmd 2015-08-08 20:39:57 -07:00
Alex Crawford 79f14822a9 Plumb linker flags through from the Makefile 2015-08-05 20:42:54 -07:00
Mike Danese fb02b33e99 fix build 2015-08-05 17:52:56 -07:00
Dawn Chen a90075d7eb Merge pull request #12008 from smarterclayton/fix_mac
mktemp on OSX behaves differently than Linux
2015-08-05 15:17:59 -07:00
Mike Danese b56edd1355 Merge pull request #11727 from ZJU-SEL/build-nonstatic-hyperkube
build hyperkube as a nonstatic binary
2015-07-31 15:46:04 -07:00
Mike Danese 0269e2baad Merge pull request #11941 from GoogleCloudPlatform/enact_version_md
Enacting versioning.md
2015-07-31 10:17:22 -07:00
Mike Danese 0ae48c449e Merge pull request #11927 from wojtek-t/remove_shell_services
Remove shell services test
2015-07-30 09:56:38 -07:00
Clayton Coleman 1a64830ef1 mktemp on OSX behaves differently than Linux
hack/test-integration and hack/test-cmd are currently broken
2015-07-30 00:41:20 -04:00
Joe Beda 55e4941c5e Fix up memory requirements for release w/ boot2docker. 2015-07-29 13:13:59 -07:00
Mike Danese 9f16fd900e Merge pull request #11860 from ingvagabund/delimiter-for-X-option-eparis
Use the correct delimiter for -X option of --ldflags (more readable solution)
2015-07-29 10:52:59 -07:00
Zach Loafman 4363f14e77 Enacting versioning.md
This PR changes how we version going forward in the following ways:

* mark-new-version.sh is changed to a new policy of just splitting
branches, rather than the old backmerge policy, as discussed in
vX.Y.0, and a tag for vX.(Y+1).0-alpha.0 back to master.

* I eliminated PRs back to master by making the version/base.go
gitVersion and gitCommit just be `export-subst`. I testing that this
works with GitHub's source export tarballs. There's no reason to
bother with forcing the version into `base.go` (especially twice). The
tarball versions outside a git tree aren't perfect (master looks like
"v0.0.0+hash", and the release branches look more accurate), but our
build contract has never allowed that version is perfect in this
situation, so I think we can relax this.

* That master tag gets picked up by "git describe" on master, so e.g.
master would have immediately become v1.1.0-alpha.0

* In order to be more semVer compatible, the gitVersion field for the
master branch now looks something like 1.1.0-alpha.0.6+84c76d1142ea4d.
This is a tiny translation of the "git describe". I did this because
there are a ton of consumers out there of the "gitVersion" field
expecting it to be the full version, but it would be nice if this
field were actually semver compliant. (1.1.0-alpha.0-6-84c76d1142ea4d
is, but it's not *usefully* so.)

Fixes #11495
2015-07-28 11:58:44 -07:00
Wojciech Tyczynski b69ef7b5ca Remove shell services test 2015-07-28 17:14:18 +02:00
Chao Xu 464385281b add a tool in cmd/ to check links in go file. Currently it's only used to check the links in api descriptions (pkg/api/.../types.go). 2015-07-24 20:21:16 -07:00
Mike Danese 01ee1b8634 Merge pull request #10840 from jbeda/master
Fix up check for min memory for parallel builds
2015-07-24 08:02:33 -07:00
Jan Chaloupka 3a90386c78 golang 1.4 was happy with -X key val
golang 1.5 complains ans wants -X key=val
2015-07-24 16:56:18 +02:00
He Simei a210a96f5f build hyperkube as a nonstatic binary 2015-07-23 09:18:08 +08:00
Tim Hockin 261d2ce423 Ignore whitespace when diffing generated docs 2015-07-17 15:28:58 -07:00
Daniel Smith ffcc6cadb0 run munger over examples dir 2015-07-13 17:47:48 -07:00
Daniel Smith bf77ecc3a9 Various munger changes
* Add analytics munger w/ munge heading
* More link autofixes
* Allow running a subset of munges
* Fix repo root detection
* Only process non-preformatted blocks
* Gendocs no longer adds the analytics link; mungedocs does that in a
  second pass.
2015-07-13 17:47:48 -07:00
Mike Danese 055115a109 fake realpath, and standardize treatment of trailing / of dirs in gendoc 2015-07-13 15:27:33 -07:00
Mike Danese b4514ee1f3 fix run-gendocs to point to new repo location 2015-07-13 13:01:20 -07:00
Tim Hockin 06a6623a70 Filter munges out during doc generation
This allows us to apply content-mutating munges to generated files and nothave
the verifier flag them as needing regeneration later.
2015-07-13 11:23:07 -07:00
Eric Tune c51e35e835 Support for in-place modification of docs
Adds cmd/mungedocs which is framework for processing
all files under docs/ and either verifying that no changes needed or
making in-place changes.

Did not reuse kube::util::gen-docs because that seemed to be
centered around handling added files, and this pass does not
add files.

Planned uses:
 - table of contents automatic updating
 - linkification
 - internal link checker
 - link-path-relativizer or absolutizer
 - example file syncer
 - header inserter.

Just table-of-contents updating in this PR.

Added Table of Contents to docs/networking.md.

Demonstrates use of new TOC generator presubmit.
Other docs will be added in future PRs.
Additional development will be needed to handle some
of the more complex cases.
2015-07-08 14:58:54 -07:00
Joe Beda 6c4ae61f6b Fix up check for min memory for parallel builds 2015-07-07 10:14:23 -07:00
Tim Hockin a95814b593 make swagger presubmit not spew noise 2015-07-02 14:03:02 -07:00
Abhi Shah 52db576617 Merge pull request #8882 from mesosphere/upstream_k8sm
Upstream Kubernetes-Mesos framework
2015-06-12 06:36:20 -07:00
James DeFelice 91238f8b44 Make building contrib code optional 2015-06-10 20:30:10 +00:00
Daniel Smith 97ebc1aad9 improve output of kube_get_url 2015-06-09 15:26:09 -07:00
Daniel Smith 6e95388672 allow kubectl to be built statically
* Package kubectl in a container
* Add example with a pod using kubectl as a sidecar
2015-06-03 15:41:09 -07:00
Filip Grzadkowski 98115facfd Revert "Gracefully delete pods from the Kubelet" 2015-06-02 23:40:05 +02:00
Clayton Coleman 984692d205 Verify in hack/test-cmd 2015-06-01 19:24:01 -04:00
Tim Hockin a3d5367156 Merge pull request #8765 from eparis/hack-test-failure
Fix build with --use_go_build (e2e.test failure)
2015-05-27 12:43:04 -07: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
Tim Hockin 76a0a7dff2 Shush minor stdout noise on builds 2015-05-19 11:24:44 -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
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