Commit Graph

6504 Commits (187ef17ed8652b082558fad30d988e0b7ddb91e4)

Author SHA1 Message Date
David Eads d8924bc1c9 move old dynamic client to deprecated-client 2018-05-11 08:00:46 -04:00
Kubernetes Submit Queue 817d822ce9
Merge pull request #63628 from dougm/local-up-cluster
Automatic merge from submit-queue (batch tested with PRs 63703, 63628). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use absolute path for KUBECTL default in local up cluster

This avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.



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

Avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.

**Release note**:

```release-note
NONE
```
2018-05-11 04:32:09 -07:00
Kubernetes Submit Queue 27803825e3
Merge pull request #63669 from deads2k/cli-55-restmappersnip
Automatic merge from submit-queue (batch tested with PRs 63669, 63511, 63561, 63289). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 move resource builder to generic options

This pull snips the last kube/kube links from the resource builder and moves it to the genericclioptions to be built out into flags from there.

@kubernetes/sig-cli-maintainers 

```release-note
NONE
```
2018-05-10 14:25:10 -07:00
Kubernetes Submit Queue 8ce536df1a
Merge pull request #62665 from liztio/kubeadm-e2e
Automatic merge from submit-queue (batch tested with PRs 62665, 62194, 63616, 63672, 63450). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Kubeadm e2e

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

Provides in-tree E2E tests for the Kubeadm subproject

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes [kubeadm#456](https://github.com/kubernetes/kubeadm/issues/456)

**Special notes for your reviewer**:

The weird way tests are executed mirrors `e2e_node`. A future pull request will add a frontend for these tests to kubetest, which will abstract away much of this detail.

**Release note**:
```release-note
NONE
```
2018-05-10 12:56:12 -07:00
David Eads 16d6a6c52f move resource builder to generic options 2018-05-10 14:15:12 -04:00
liz 4ba3218336
Basic E2E tests for kubeadm
Run with `go run test/e2e_kubeadm/runner/local/run_local.go -build -test-flags="--kubeconfig=$KUBECONFIG"`
2018-05-10 12:54:25 -04:00
Doug MacEachern 2dd3fbda0b Use absolute path for KUBECTL default in local up cluster
This avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.
2018-05-09 16:25:59 -07:00
David Eads ad87219b2c category expansion can only come from the server 2018-05-09 15:05:58 -04:00
David Eads c5445d3c56 simplify api registration 2018-05-08 18:33:50 -04:00
Jeff Grafton b9efd1f467 workspace mirror: add trailing newline to urls list 2018-05-07 16:52:20 -07:00
Kubernetes Submit Queue 678152bc00
Merge pull request #63412 from praseodym/go1.10.2
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update to go1.10.2

**What this PR does / why we need it**:
Update to use go1.10.2 which [includes some compiler and linker fixes](https://golang.org/doc/devel/release.html#go1.10.minor).

**Special notes for your reviewer**:
[Docker image `golang:1.10.2` should be available soon](https://github.com/docker-library/official-images/pull/4317).

**Release note**:
```release-note
Update to use go1.10.2
```
2018-05-04 18:59:52 -07:00
Kubernetes Submit Queue 31511f9e24
Merge pull request #63383 from liggitt/lease-reconciler
Automatic merge from submit-queue (batch tested with PRs 63315, 63383, 63318, 63439). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Re-enable lease reconciler, fix shutdown race

Fixes #63378
Fixes #57617

* Fixes the openapi script to wait for the apiserver on shutdown (like all the other scripts do)
* Fixes the apiserver shutdown to not hang forever if the kubernetes service reconciler cannot persist to etcd
* Readds https://github.com/kubernetes/kubernetes/pull/58474 to make the default the lease reconciler

```release-note
kube-apiserver: the default `--endpoint-reconciler-type` is now `lease`. The `master-count` endpoint reconciler type is deprecated and will be removed in 1.13.
```
2018-05-04 12:41:09 -07:00
Kubernetes Submit Queue 1929e0d86d
Merge pull request #63298 from dims/kubelet-remove-unused-code
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubelet - Remove unused code

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

Looks like we have a bunch of unused methods. Let's clean them up

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-04 04:20:06 -07:00
Mark Janssen ac731ed2e5 Update to go1.10.2 2018-05-04 00:39:21 +02:00
Jordan Liggitt 30f2962ede
Make openapi spec generation wait for the apiserver on shutdown 2018-05-02 22:44:48 -04:00
Kubernetes Submit Queue b5f61ac129
Merge pull request #62657 from matthyx/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```
2018-05-02 19:44:32 -07:00
Kubernetes Submit Queue 03eb9f687f
Merge pull request #62060 from WanLinghao/namespace_miss_fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix namespace miss bug

**What this PR does / why we need it**:
This  patch fixes  the namespace miss problems.
I am not sure if this is the correct way it should be fixed.
Just offer a solution.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62059

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-02 18:04:06 -07:00
WanLinghao a2c029f6c3 1.fix kubectl get * --all-namespaces
namespace miss error
	2.also add a test case
	modified:   pkg/kubectl/cmd/get/get.go
	modified:   hack/make-rules/test-cmd-util.sh
2018-05-02 11:27:22 +08:00
Kubernetes Submit Queue 8f571a0e9d
Merge pull request #63308 from liggitt/cronjob-set-test
Automatic merge from submit-queue (batch tested with PRs 63335, 63308). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add set image test for sparse API group resource

Ensures set image works correctly on resources that do not exist in the preferred version of their API group

Tests scenario noticed in review of https://github.com/kubernetes/kubernetes/pull/63206#discussion_r185008596

```release-note
NONE
```
2018-05-01 19:31:08 -07:00
Davanum Srinivas 4bacd77321 Remove unused code 2018-04-30 14:57:26 -04:00
Maciej Szulik b7d4f15965
Remove Factory from more Run commands 2018-04-30 19:58:54 +02:00
Jordan Liggitt 5e24289f89
Add set image test for sparse API group resource 2018-04-30 13:28:46 -04:00
liz a80b5454af
Generated artefacts 2018-04-30 10:00:13 -04:00
Kubernetes Submit Queue 24bc761aec
Merge pull request #62508 from dims/allow-customized-image-for-dockerized-kubelet
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Support containerized kubelet in CI

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

  * Adjust hyperkube Makefile to allow HYPERKUBE_BIN to be
    specified from outside

  * new DOCKER_ROOT variable to specify --root-dir and associated
    volume for kubelet to know where docker directory lives

  * Save the docker logs when we kill the kubelet container

  * Allow customized image for dockerized kubelet and build a Default
    image if one is not specified

  We should allow a custom build using script we have:
  `VERSION="latest" REGISTRY="k8s.gcr.io" hack/dev-push-hyperkube.sh`

  to be used quickly using DOCKERIZE_KUBELET. To do this we remove the
  hard coded `k8s.gcr.io/kubelet` image and introduce a new environment
  variable `KUBELET_IMAGE`.

  Note that we are switching to hyperkube from kubelet as we have a quick
  and easy script to build hyperkube image and load it into local docker
  daemon. This reduces bad hacks like `docker tag
  k8s.gcr.io/hyperkube-amd64:<tag> k8s.gcr.io/kubelet:latest` being used
  by folks today (see 62057)

  * Better cope with PID 0 when running "docker inspect" to look for
    the process id for kubelet container


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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-27 21:06:23 -07:00
Kubernetes Submit Queue d6967f358e
Merge pull request #63254 from liggitt/api-resources
Automatic merge from submit-queue (batch tested with PRs 60890, 63244, 60741, 63254). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add name output and verb filtering to api-resources

This allows `kubectl api-resources -o name` to be used as input to `kubectl get ...`

to see all resources still existing in a given namespace:

Example:
```sh
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get -o name -n foo
```

Release note:
```release-note
`kubectl api-resources` now supports filtering to resources supporting specific verbs, and can output fully qualified resource names suitable for combining with commands like `kubectl get`
```
2018-04-27 17:43:13 -07:00
Kubernetes Submit Queue 625bce3ff6
Merge pull request #63169 from smarterclayton/limit_dependencies
Automatic merge from submit-queue (batch tested with PRs 63251, 59166, 63250, 63180, 63169). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Break a generic package dependency to core/api/v1

It is not necessary for this package to depend on core/v1.
2018-04-27 10:45:21 -07:00
Jordan Liggitt deeb6b2a99
Add name output and verb filtering to api-resources 2018-04-27 12:36:28 -04:00
Kubernetes Submit Queue dd5f030b02
Merge pull request #63165 from deads2k/api-08-kubeapiversion
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove KUBE_API_VERSIONS

Fixes https://github.com/kubernetes/kubernetes/issues/63102

KUBE_API_VERSIONS is an attempt to control the available serialization of types. It pre-dates the idea that we'll have separate schemes, so it's not a thing that makes sense anymore.

Server-side we've had a very clear message about breaks in the logs for a year "KUBE_API_VERSIONS is only for testing. Things will break.".

Client-side it became progressively more broken as we moved to generic types for CRUD more than a year ago. What is registered doesn't matter when everything is unstructured.

We should remove this piece of legacy since it doesn't behave predictable server-side or client-side.

@smarterclayton @lavalamp
@kubernetes/sig-api-machinery-bugs 

```release-note
KUBE_API_VERSIONS is no longer respected.  It was used for testing, but runtime-config is the proper flag to set.
```
2018-04-26 08:22:36 -07:00
David Eads a68c57155e remove KUBE_API_VERSIONS 2018-04-26 08:27:49 -04:00
Kubernetes Submit Queue acbccfba84
Merge pull request #62820 from juanvallejo/jvallejo/wire-more-print-flags
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

wire printflags through additional cmds

**Release note**:
```release-note
NONE
```

Adds PrintFlag pattern to more commands.

cc @deads2k @soltysh
2018-04-26 02:20:34 -07:00
Clayton Coleman eaa739bd59
Limit access to core/api/v1 inside of client-go 2018-04-25 18:52:16 -04:00
Kubernetes Submit Queue 08d358e3d1
Merge pull request #62881 from juanvallejo/jvallejo/wire-print-flags-get-cmd
Automatic merge from submit-queue (batch tested with PRs 61601, 62881, 63159). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

wire print flags through get.go

**Release note**:
```release-note
NONE
```

Adds the PrintFlags pattern to `get.go`.
Prerequisite to ongoing server-side printing work.

cc @soltysh @deads2k
2018-04-25 14:03:21 -07:00
juanvallejo ac6ca38dd7 report outputFormat in PrintFlags err 2018-04-25 16:35:56 -04:00
juanvallejo 27bd4ded04 wire printflags through additional cmds 2018-04-25 16:07:32 -04:00
Kubernetes Submit Queue e63cf9a4d0
Merge pull request #62432 from ixdy/pkg-generated-bindata
Automatic merge from submit-queue (batch tested with PRs 62432, 62868, 63040). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

bazel: generate pkg/generated/bindata.go at build time and remove from repo

**What this PR does / why we need it**: `pkg/generated/bindata.go` is a generated file, and it's one that's easy for us to handle in bazel (we already handle `test/e2e/generated/bindata.go`, for example).

The translations also have an additional generation step (`hack/update-translations.sh`) which I'm not handling here, but this enables us to remove the `bindata.go` files from the tree (when combined with #62151).

**Release note**:

```release-note
NONE
```

/assign @rmmh @cblecker @thockin @fejta
2018-04-25 12:56:08 -07:00
juanvallejo 191a48f4c3 wire PrintFlags through get cmd 2018-04-25 15:02:48 -04:00
Jeff Grafton 8bdb67639f Add pointer comments 2018-04-25 09:47:14 -07:00
Jeff Grafton 75efdf2974 Remove pkg/generated/bindata.go from the repo 2018-04-25 09:44:22 -07:00
Jeff Grafton b9a029db6d bazel: generate pkg/generated/bindata.go at build time 2018-04-25 09:44:22 -07:00
David Eads 1a753659cf core v1 API requires autoscaling/v1 to serve the Scale endpoint 2018-04-25 09:02:31 -04:00
Davanum Srinivas b44c68eb2e Hack for testing until test-infra/pull/7846 merges 2018-04-25 06:12:20 -04:00
Marek Siarkowicz f0b5e2d7c5 Remove examples directory 2018-04-24 19:45:43 +01:00
Davanum Srinivas f2959ab2b0 Support containerized kubelet in CI
* Adjust hyperkube Makefile to allow HYPERKUBE_BIN to be
    specified from outside

  * new DOCKER_ROOT variable to specify --root-dir and associated
    volume for kubelet to know where docker directory lives

  * Save the docker logs when we kill the kubelet container

  * Allow customized image for dockerized kubelet and build a Default
    image if one is not specified

  We should allow a custom build using script we have:
  `VERSION="latest" REGISTRY="k8s.gcr.io" hack/dev-push-hyperkube.sh`

  to be used quickly using DOCKERIZE_KUBELET. To do this we remove the
  hard coded `k8s.gcr.io/kubelet` image and introduce a new environment
  variable `KUBELET_IMAGE`.

  Note that we are switching to hyperkube from kubelet as we have a quick
  and easy script to build hyperkube image and load it into local docker
  daemon. This reduces bad hacks like `docker tag
  k8s.gcr.io/hyperkube-amd64:<tag> k8s.gcr.io/kubelet:latest` being used
  by folks today (see 62057)

  * Better cope with PID 0 when running "docker inspect" to look for
    the process id for kubelet container
2018-04-24 10:19:50 -04:00
Kubernetes Submit Queue 42415e3186
Merge pull request #63046 from cblecker/go-go-minimum
Automatic merge from submit-queue (batch tested with PRs 63046, 62925, 63014). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump minimum required go version to 1.10.1

**What this PR does / why we need it**:
We have supported go1.10.x for a few weeks now (#60597). CI has all been updated. This enforces it as the new minimum go version required go k8s >=1.11

**Release note**:
No release note, as #60597 already had one.
```release-note
NONE
```
2018-04-24 00:42:09 -07:00
Kubernetes Submit Queue fce3ad5198
Merge pull request #62151 from thockin/build-cleanup-with-go-1-10
Automatic merge from submit-queue (batch tested with PRs 62495, 63003, 62829, 62151, 62002). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Build cleanup with go 1.10

Simplify our build/test scripts now that go 1.10 is in play.  It has caching that seems to actually work.

**Release note**:
```release-note
NONE
```
2018-04-23 22:45:24 -07:00
Kubernetes Submit Queue 316530a964
Merge pull request #62495 from rmmh/bzl-cache
Automatic merge from submit-queue (batch tested with PRs 62495, 63003, 62829, 62151, 62002). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a GCS mirror to WORKSPACE URLs, along with a script to update them.

**What this PR does / why we need it**:
We get occasional flakes when WORKSPACE downloads fail. This should make that much more unlikely, by having two independent endpoints to try.

**Release note**:
```release-note
NONE
```
2018-04-23 22:45:14 -07:00
Kubernetes Submit Queue b1e9dcc26d
Merge pull request #62586 from dims/volunteer-for-local-up-cluster-related-files
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Volunteer for local-up-cluster related files

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

Wish to help with changes to hack/local-up-cluster.sh and any spill over
into other files that affect hack/local-up-cluster.sh.


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

**Special notes for your reviewer**:

**Release note**:

```release-note

```
2018-04-23 20:16:54 -07:00
Christoph Blecker 94d56ffbde
Bump minimum required go version to 1.10.1 2018-04-23 18:08:10 -07:00
Ryan Hitchman d53b5f1f2e Add a GCS mirror to WORKSPACE URLs. //hack:update-mirror updates it.
This will help avoid flakes when initializing WORKSPACE, since there are
two sources for each file. Any errors downloading or failed hashes cause
bazel to try the next url in the series.
2018-04-20 13:55:23 -07:00
Kubernetes Submit Queue 019c805ff2
Merge pull request #62858 from deads2k/cli-32-more-record-02
Automatic merge from submit-queue (batch tested with PRs 62642, 62855, 62487, 62858, 62873). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 final record flag cleanup

This ties off the remainder of the record flag uses.  Trying to merge different types of patches is fraught, so I added a way to get a merge patch (not a strategic patch) back from the annotation update.

@kubernetes/sig-cli-maintainers 
/assign @soltysh 
/assign @juanvallejo 

```release-note
NONE
```
2018-04-19 15:54:25 -07:00