Commit Graph

355 Commits (12147a3cd6f52b1831c8af34d14d52e2811a4668)

Author SHA1 Message Date
deads2k 6421405d0e create hack/local-up-discovery.sh 2016-12-12 08:40:00 -05:00
deads2k bcb8d8b8bb extra discovery start and cert generation 2016-12-12 08:28:29 -05:00
Kubernetes Submit Queue 48cae78257 Merge pull request #36361 from ivan4th/build-container-rsync-optimizations
Automatic merge from submit-queue (batch tested with PRs 38277, 36361, 38452)

Add options for build container rsync optimization

KUBE_RSYNC_COMPRESS env var sets rsync compression level.
KUBE_RSYNC_GENERATED_TO_BUILD_CONTAINER env var disables rsyncing
generated files to build containers.

Why KUBE_RSYNC_COMPRESS is needed -- from rsync manual on `--compress` option (implied by non-zero `--compress-level`):
> Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over  the connection.

Use case for `KUBE_RSYNC_GENERATED_TO_BUILD_CONTAINER`: when you sometimes build stuff locally (e.g. `make WHAT=cmd/kubectl`) and sometimes do it on remote docker (`build-tools/run.sh make WHAT=cmd/hyperkube`), local builds touch generated files which causes them to be rsynced to the build data container, which may slow down the builds. Still, I'm not sure whether local->remote rsync of generated files is useful (e.g. someone may want to edit generated files for debugging purposes?), so I made not rsyncing these files an option instead of forcing such behavior.
2016-12-11 13:02:53 -08:00
Lucas Käldström afefb19ac4 Fix the cross-build 2016-12-10 16:26:21 +02:00
Kubernetes Submit Queue 9e3fc8de9e Merge pull request #36050 from linux-on-ibm-z/master
Automatic merge from submit-queue (batch tested with PRs 37860, 38429, 38451, 36050, 38463)

[Part 2] Adding s390x cross-compilation support for gcr.io images in this repo

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: This PR enables s390x support to kube-dns , pause, addon-manager, etcd, hyperkube, kube-discovery etc. This PR also includes the changes due to which it can be cross compiled on x86 host architecture.

**Which issue this PR fixes #34328

**Special notes for your reviewer**:  In existing file "build-tools/build-image/cross/Dockerfile" the repository mentioned for installing cross build tool chains for supporting architecture does not have a tool chain for s390x hence in my PR I am changing the repository so that it will be cross compiled for s390x.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```
Allows cross compilation of Kubernetes on x86 host for s390x also enables s390x support to kube-dns , pause, addon-manager, etcd, hyperkube, kube-discovery etc  
```
2016-12-09 13:22:18 -08:00
gajju26 70b92aab45 PR-2 Making docker images availabe for s390x on gcr.io repository and enables s390x support to kube-dns , pause, addon-manager, etcd, hyperkube, kube-discovery modules 2016-12-09 14:38:02 +05:30
Kubernetes Submit Queue 8cf079bd74 Merge pull request #28458 from rbtcollins/master
Automatic merge from submit-queue (batch tested with PRs 38260, 32811, 28458, 33570, 37096)

Fix support for DNS in local-up-cluster.sh

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

The default appears to be gce now, so this tries to spawn a service in
gce... not the desired outcome for a local test setup.

We also need to sync the kubectl config in the script with the instructions for users, since if people don't test with DNS enabled, it bitrots (which this aims to fix).

To test manually, run something like
```
sudo KUBE_ENABLE_CLUSTER_DNS=true API_HOST_IP=0.0.0.0 ./hack/local-up-cluster.sh
```

The API_HOST_IP=0.0.0.0 is required, otherwise the master is not contactable by kubedns, and the dns pod will fail readychecking on the healthz pod.
2016-12-08 02:11:22 -08:00
Kubernetes Submit Queue 5e923ddc7d Merge pull request #38111 from henrynash/pipe141error
Automatic merge from submit-queue (batch tested with PRs 38111, 38121)

Prevent SIGPIPE errors causing the version check line to fail

The way we use pipe in hack/lib/etcd.sh when processing the version command can lead to
141 failues on some systems. Using a prefix of tail can prevent this.

Fixes #38109
2016-12-05 14:14:39 -08:00
henry.nash@uk.ibm.com ec33164686 Prevent SIGPIPE errors causing the version check line to fail
The use of pipe when process the version command can lead to
141 failues on some systems. Using a prefix of tail can prevent this.
2016-12-05 06:36:30 -08:00
Clayton Coleman 138267c876
Switch generator logic to use pkg/apis/meta/v1 2016-12-03 18:57:30 -05:00
Kubernetes Submit Queue 69170e7243 Merge pull request #37826 from danwinship/etcd-path
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826)

Fix the PATH that install-etcd.sh tells you to use

After you run install-etcd.sh, it tells you:

    etcd v3.0.14 installed. To use:
    export PATH=${PATH}:/home/danw/rh/go/src/k8s.io/kubernetes/third_party/etcd

which doesn't work if you have an older etcd installed in /usr/bin:

    danw@w541:kubernetes (master)> PATH=${PATH}:/home/danw/rh/go/src/k8s.io/kubernetes/third_party/etcd etcd --version
    etcd Version: 2.2.5

You need to put the local etcd dir first in PATH, not last.
2016-12-03 04:27:53 -08:00
Kubernetes Submit Queue 8bf1ae8313 Merge pull request #37094 from sjug/reshuffle_gobindata_dep
Automatic merge from submit-queue (batch tested with PRs 37094, 37663, 37442, 37808, 37826)

Moved gobindata, refactored ReadOrDie refs

**What this PR does / why we need it**: Having gobindata inside of test/e2e/framework prevents external projects from importing the framework. Moving it out and managing refs fixes this problem.

**Which issue this PR fixes**: fixes #37007
2016-12-03 04:27:46 -08:00
Kubernetes Submit Queue 7621ada226 Merge pull request #36700 from ingvagabund/move-export-flag-of-kubectl-to-get-subcommand
Automatic merge from submit-queue (batch tested with PRs 37997, 37939, 37990, 36700, 37258)

--export flag belongs to kubectl get, not kubectl

**What this PR does / why we need it**:

When running the kubectl via symlink to hyperkube, the ``--export`` flag is not delegated to `kubectl get` but to `kubectl` only. Ending with unrecognized flag.
2016-12-02 19:26:51 -08:00
Sebastian Jug 79202656bc - Moved gobindata, refactored ReadOrDie refs
- Remaining spaghetti untangled
- Missed bazel update and a few hardcoded refs
- New instance of framework.ReadOrDie reference removed post rebase
- Resolve new clientset rebase
- Fixed e2e/generated BUILD dep
- A space
- Missed gobindata ref in golang.sh
2016-12-02 12:57:03 -05:00
Kubernetes Submit Queue 7ec3be4c8e Merge pull request #36964 from ixdy/gobin-build
Automatic merge from submit-queue

Build vendored copy of go-bindata and use that in go generate step

**What this PR does / why we need it**: as the title says, uses the vendored version of `go-bindata` rather than expecting developers to `go get` it (when building outside docker).

**Which issue this PR fixes**: fixes #34067, partially addresses #36655

**Special notes for your reviewer**: we still call `go generate` far too many times:
```console
~/.../src/k8s.io/kubernetes $ which go-bindata
~/.../src/k8s.io/kubernetes $ make
+++ [1116 17:35:28] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1116 17:35:29] Generating bindata:
    test/e2e/framework/gobindata_util.go
+++ [1116 17:35:30] Building go targets for linux/amd64:
    cmd/libs/go2idl/deepcopy-gen
+++ [1116 17:35:35] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1116 17:35:35] Generating bindata:
    test/e2e/framework/gobindata_util.go
+++ [1116 17:35:36] Building go targets for linux/amd64:
    cmd/libs/go2idl/defaulter-gen
+++ [1116 17:35:41] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1116 17:35:41] Generating bindata:
    test/e2e/framework/gobindata_util.go
+++ [1116 17:35:42] Building go targets for linux/amd64:
    cmd/libs/go2idl/conversion-gen
+++ [1116 17:35:47] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1116 17:35:47] Generating bindata:
    test/e2e/framework/gobindata_util.go
+++ [1116 17:35:48] Building go targets for linux/amd64:
    cmd/libs/go2idl/openapi-gen
+++ [1116 17:35:56] Building the toolchain targets:
    k8s.io/kubernetes/hack/cmd/teststale
    k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [1116 17:35:56] Generating bindata:
    test/e2e/framework/gobindata_util.go
```
Fixing that is a separate effort, though.

cc @sebgoa @ZhangBanger
2016-12-02 07:29:01 -08:00
Jeff Grafton 38690ff7a7 build: don't call unset_platform_envs before building 2016-12-01 10:37:39 -08:00
Dan Winship b39ddf64f6 Fix the PATH that install-etcd.sh tells you to use
If you have an old etcd installed in /usr/bin then you need to add the
local etcd directory to the *start* of PATH, not the end.
2016-12-01 10:07:23 -05:00
Jeff Grafton 0d9d623f04 Build vendored copy of go-bindata and use that in go generate step
Additionally remove all instances of `go get`ing go-bindata
2016-11-30 22:23:40 -08:00
Jeff Grafton 9848d6cc8d build: clean platform envs to prevent cross-contamination 2016-11-29 16:35:45 -08:00
Ivan Shvedunov 2256b27f95 Add options for build container rsync optimization
KUBE_RSYNC_COMPRESS env var sets rsync compression level.
KUBE_RSYNC_GENERATED_TO_BUILD_CONTAINER env var disables rsyncing
generated files to build containers.
2016-11-23 05:40:39 +03:00
Robert Collins d388f3100f Fix support for DNS in local-up-cluster.sh
- Fix unbound variables in hack/local-up-cluster.sh

- explicitly set KUBERNETES_PROVIDER in local-up-cluster.
  The default appears to be gce now, so this tries to spawn a service
  in gce... not the desired outcome for a local test setup.

- Remove stale creation of kube-system: the kube-system namespace is
  built in these days.

- Pickup third party etcd automatically.

- Retab hack/local-up-cluster.sh for consistency

- Update hack-local-up's internal credentials to match the user
  instructions we give (which work).

- Note the CA root requirement in local-up-cluster

- Fix a dangling comment in local-up-cluster

To test manually, run something like:
```sudo KUBE_ENABLE_CLUSTER_DNS+true API_HOST_IP=0.0.0.0
   ./hack/local-up-cluster.sh```
The API_HOST_IP=0.0.0.0 is required otherwise kubedns cannot contact
the master and the dns pod will fail readychecking on the healthz
container.
2016-11-22 13:18:55 +13:00
Jan Chaloupka 7992123449 --export flag belongs to kubectl get, not kubectl
When running the kubectl via symlink to hyperkube, the --export is not delegated to 'kubectl get' but to 'kubectl' only.
Ending with unrecognized flag.
2016-11-17 15:45:55 +01:00
Wojciech Tyczynski b34ac6baef Bump etcd to 3.0.14 in tests 2016-11-07 08:41:17 +01:00
Kubernetes Submit Queue 47519962bf Merge pull request #35484 from smarterclayton/delete_warning
Automatic merge from submit-queue

Add --force to kubectl delete and explain force deletion

--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.

Part of #34160 & #29033

```release-note
In order to bypass graceful deletion of pods (to immediately remove the pod from the API) the user must now provide the `--force` flag in addition to `--grace-period=0`.  This prevents users from accidentally force deleting pods without being aware of the consequences of force deletion.  Force deleting pods for resources like StatefulSets can result in multiple pods with the same name having running processes in the cluster, which may lead to data corruption or data inconsistency when using shared storage or common API endpoints.
```
2016-11-05 11:19:04 -07:00
Kubernetes Submit Queue 6a88de9fe1 Merge pull request #35648 from deads2k/api-32-reflective-checks
Automatic merge from submit-queue

add script to check for updates to the files for generation

Adds a verify script to help people writing APIs remember to wire all the individual pieces up.  Eventually it will be better to avoid this altogether, but this is a start.

@ncdc fyi
2016-11-04 01:16:52 -07:00
Marcin 26acced6d8 Add policy api version v1beta1 and disable v1alpha1 2016-11-03 13:26:27 +01:00
Kubernetes Submit Queue e817594648 Merge pull request #35731 from janetkuo/statefulset-v1beta1
Automatic merge from submit-queue

Move Statefulset (previously PetSet) to v1beta1

**What this PR does / why we need it**: #28718

**Which issue this PR fixes** _(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)_: fixes #

**Special notes for your reviewer**: depends on #35663 (PetSet rename)
cc @erictune @foxish @kubernetes/sig-apps 

**Release note**:

``` release-note
v1beta1/StatefulSet replaces v1alpha1/PetSet.
```
2016-11-03 02:46:57 -07:00
Janet Kuo c15b9470f5 Replace apps/v1alpha1 with apps/v1beta1 and manually remove generated apps/v1alpha1 files
Manually remove generated apps/v1alpha1 types, protobuf, and api-reference doc files
Manually remove apps/v1alpha1 folder from 1.5 generated client
2016-11-02 15:16:23 -07:00
Clayton Coleman 6e25830378
Add --force to kubectl delete and explain force deletion
--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.
2016-11-02 17:44:05 -04:00
Madhusudan.C.S 3c692ebd77 [Federation] Implement the `kubefed` command.
Also:
1. Add it to the client build targets list.
2. Register `kubefed join` and `kubefed unjoin` commands.
2016-11-02 12:48:20 -07:00
deads2k 4850314a5c add script to check for updates to the files for generation 2016-11-01 15:59:50 -04:00
Wojciech Tyczynski 543c2c20ac Update etcd in tests to 3.0.13 2016-10-27 15:06:08 +02:00
Kubernetes Submit Queue d9873f4556 Merge pull request #35644 from thockin/build-fix-rsync
Automatic merge from submit-queue

Build: Use checksum to rsync results

If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but if Go decides the
dependencies are not ACTUALLY updated (maybe it was a test file - known
limitation of the current Makefile), it does not touch the resulting binary.
The Makefile touches the result explicitly to mark that the dep change has
been handled.  But rsync blows away that change with the older file, and
helpfully preserves the timestamp.  This repeats on every build.

Now rsync ignores it if the checksum is the same.  Result = faster build.

@wojtek-t @gmarek
2016-10-26 12:42:42 -07:00
Tim Hockin 7aa91bbff6 Use checksum to rsync results
If dependencies are touched, the Makefile will detect that tools like
deepcopy-gen need to be rebuilt.  It will rebuild them, but Go decides the
dependencies are not actually updated (maybe it was a test file - known
limitation of the current Makefile) and does not touch the resulting binary.
Then the Makefile touches the result explicitly to mark thatthe dep change has
been handled.  Then rsync blows away that change with the older file, and
helpfully preserves the timestamp.

Now rsync ignores it if the checksum is the same.  Result = faster build.
2016-10-26 16:30:18 +02:00
mbohlool 75451b49f4 - Add GroupVersion as tags to OpenAPI spec
- Remove all end-point specs as they are not useful in light of GroupVersion tags in main spec
2016-10-25 14:27:48 -07:00
Mike Danese 27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
Kubernetes Submit Queue 29fc947cbb Merge pull request #34770 from lukaszo/curl_flake
Automatic merge from submit-queue

Retry curl when it failed during download

Fixes #34769

For now I'm adding retry only to etcd installation as I saw it recently to fail in one of my PRs. We may change it also in other places if it also happens.
2016-10-20 02:10:27 -07:00
Davanum Srinivas 20d1818d78 Enable local-up-cluster.sh to start with the secured port
Generate a kubeconfig for use with controller-manager, kubelet,
scheduler etc. This kubeconfig should use the secure https
port of the api server with appropriate ca cert for the components
to talk to api server.

With this change, one can set API_PORT=0 to completely switch off
insecure access for testing admission controllers etc.

Fixes #33375
2016-10-19 06:36:01 -04:00
Łukasz Oleś 1cda616a9b Retry curl when it failed during download
Fixes #34769
2016-10-19 11:04:49 +02:00
Kubernetes Submit Queue 2e5303d206 Merge pull request #34612 from jellonek/jell/fix_version_generation
Automatic merge from submit-queue

build: Fix version generation.

This PR provides update to version string generation procedure to handle additional case - working on branch delivered from release tag, instead of working on `-(alpha|beta).no` suffixed tag.

Reason of it is that actually if someone would start working on branch forked from release tag (`v1.4.1` for example), will add some commits and then would try to build k8s/run conformance tests - will end up with broken version string in form similar to `v1.4.1.X+YYYY` where `X` is a dictance/number of commits from base tag and `YYYY` will be first 14 characters from commit hash.
Such version - containing four dotted parts is rejected during conformance tests with error similar to:
```
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl.go:843
Oct 11 12:38:33.726: Failed to get server version: Unable to parse server version "v1.4.1.5+somecommithash": Invalid character(s) found in patch number "1.5"
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:413
```

This PR provides a cure for this situation creating version string in form `v1.4.1-X+YYYY` which then should be readable for version validation checks. 

Release note:
```release-note
Fix version string generation for local version different from release and not based on `-alpha.no` or `-beta.no` suffixed tag.
```
2016-10-18 21:11:36 -07:00
Piotr Skamruk 66a85555a2 build: Fix version generation. 2016-10-17 09:13:22 +02:00
Jess Frazelle 3193174142
Remove go patches for darwin
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:12:15 -07:00
Kubernetes Submit Queue cfbb5e1040 Merge pull request #34150 from mbohlool/co2
Automatic merge from submit-queue

Fix a typo in openapi spec generation

A typo in util.sh resulted in the wrong spec stored in source tree. The commit should be explanatory.
2016-10-06 08:44:59 -07:00
Wojciech Tyczynski 19e50d56dc Run integration tests with 3.0.10 etcd underneath 2016-10-06 09:32:49 +02:00
mbohlool 4ed8328e8d Fix a typo in util.sh that resulted in wrong openapi spec generation 2016-10-05 15:59:38 -07:00
Joe Beda dd3ac00c7d Install test subpackages too
We weren't getting incremental builds because of new test only subpackages.  Our
voodoo combo of 'go install' and 'go test -c' didn't cache things like
'test/e2e_node/services'.  Add the '-i' flag to 'go test' to install test only
dependencies too.
2016-10-03 19:42:21 -07:00
Joe Beda 17454a04ac Remove support for boot2docker 2016-10-03 19:42:20 -07:00
Kubernetes Submit Queue 2628af06f8 Merge pull request #33803 from ixdy/go1.7-darwin-client-binaries
Automatic merge from submit-queue

Use patched golang1.7.1 for cross-builds targeting darwin

This PR extends #32517 to use the patched go1.7.1 introduced by that PR to build all darwin targets (e.g. kubectl).

This is necessary because binaries built with earlier versions of Go regularly segfault on macOS Sierra (see #32999 and #33070).

This solution is somewhat hacky, but we intend to cherry-pick this to 1.4, and switching all of 1.4 to build with go1.7.1 is very high risk.

I haven't yet pushed the cross build image yet, so this will fail to build. Will test locally and update with results.

First step of fixing #33801.

cc @luxas @pwittrock @david-mcmahon @liggitt @smarterclayton @jfrazelle @Starefossen @gerred
2016-09-30 12:29:18 -07:00
Jeff Grafton f769b02c8f Use patched go1.7.1 for cross-builds targeting darwin 2016-09-29 17:05:23 -07:00
mbohlool 35b5174bf1 Generate and verify openapi specs in source tree at api/openapi-spec 2016-09-29 17:03:31 -07:00