Commit Graph

37568 Commits (77db65d6bbbed412ceefdc491f6cf9233a0461ce)

Author SHA1 Message Date
Kubernetes Submit Queue 6931fb1830 Merge pull request #34984 from mwielgus/configmap-fed-client
Automatic merge from submit-queue

ConfigMap in federated client

cc: @quinton-hoole @nikhiljindal
2016-10-18 16:21:50 -07:00
Kubernetes Submit Queue a31482207f Merge pull request #34960 from sdminonne/serviceaccount_informer
Automatic merge from submit-queue

To add service account informer

@deads2k  this PR adds ServiceAccount informer as discussed [here](https://github.com/openshift/origin/pull/11330#issuecomment-253216303)
2016-10-18 16:21:41 -07:00
Jeff Grafton 2e503c1a54 Add option to get-kube-binaries.sh to download and extract tests
Also fix an unset variable
2016-10-18 16:13:38 -07:00
Angus Salkeld d58554a647 Move the common test functions from cmd_test.go to cmd/testing/fake.go
This is so that we can use NewAPIFactory() from cmd/set/*test.go
Up until now we would get a import loop error.

This commit also adds a basic unit test case for cmd/set/set_image.go
2016-10-19 08:53:26 +10:00
Tim Hockin 837443d37a Change merge key for VolumeMount to mountPath 2016-10-18 15:27:12 -07:00
Kubernetes Submit Queue 4b7024efe7 Merge pull request #27784 from deads2k/catch-mutators
Automatic merge from submit-queue

add optional mutation checks for shared informer cache

We need to make sure that no one is mutating caches if they're using a shared informer.  It is important that whatever is tracking those changes gets the object *before* anyone else possibly could.

This adds the ability to track the original objects in the cache and their current values.  Go doesn't have an exit hook or a way to say "wait for non-daemon go-funcs to complete before exit", so this runs a gofunc on a loop that can panic the entire process.  It's gated behind an env var.

@derekwaynecarr did I get the right spots to make sure that e2e runs with this flag?
@smarterclayton @kubernetes/rh-cluster-infra
2016-10-18 14:38:57 -07:00
Sean Lang 30abebd5e2 Change link to official Ceph Kubernetes docs
@elsonrodriguez, @hunter, and @leseb have gotten Ceph to run almost entirely within Kubernetes. Also, the official Ceph Docker image is more likely to be kept updated.
2016-10-18 17:37:45 -04:00
Kubernetes Submit Queue f39e86c0a5 Merge pull request #34474 from liggitt/connection-info-refactor
Automatic merge from submit-queue

Remove static kubelet client, refactor ConnectionInfoGetter

Follow up to https://github.com/kubernetes/kubernetes/pull/33718

* Collapses the multi-valued return to a `ConnectionInfo` struct
* Removes the "raw" connection info method and interface, since it was only used in a single non-test location (by the "real" connection info method)
* Disentangles the node REST object from being a ConnectionInfoProvider itself by extracting an implementation of ConnectionInfoProvider that takes a node (using a provided NodeGetter) and determines ConnectionInfo
* Plumbs the KubeletClientConfig to the point where we construct the helper object that combines the config and the node lookup. I anticipate adding a preference order for choosing an address type in https://github.com/kubernetes/kubernetes/pull/34259
2016-10-18 13:20:25 -07:00
Kubernetes Submit Queue 97525c0c7d Merge pull request #32628 from caesarxuchao/sync-gc
Automatic merge from submit-queue

[RFC] Add a proposal for synchronous garbage collection

Tracking issue: #29891

@lavalamp @kubernetes/sig-api-machinery @kubernetes/api-review-team
2016-10-18 12:37:42 -07:00
Kubernetes Submit Queue 84aa5f695f Merge pull request #35038 from sjenning/nfs-nonblock-reader2
Automatic merge from submit-queue

kubelet: storage: don't hang kubelet on unresponsive nfs

Fixes #31272 

Currently, due to the nature of nfs, an unresponsive nfs volume in a pod can wedge the kubelet such that additional pods can not be run.

The discussion thus far surrounding this issue was to wrap the `lstat`, the syscall that ends up hanging in uninterruptible sleep, in a goroutine and limiting the number of goroutines that hang to one per-pod per-volume.

However, in my investigation, I found that the callsites that request a listing of the volumes from a particular volume plugin directory don't care anything about the properties provided by the `lstat` call.  They only care about whether or not a directory exists.

Given that constraint, this PR just avoids the `lstat` call by using `Readdirnames()` instead of `ReadDir()` or `ReadDirNoExit()`

### More detail for reviewers
Consider the pod mounted nfs volume at `/var/lib/kubelet/pods/881341b5-9551-11e6-af4c-fa163e815edd/volumes/kubernetes.io~nfs/myvol`.  The kubelet wedges because when we do a `ReadDir()` or `ReadDirNoExit()` it calls `syscall.Lstat` on `myvol` which requires communication with the nfs server.  If the nfs server is unreachable, this call hangs forever.

However, for our code, we only care what about the names of files/directory contained in `kubernetes.io~nfs` directory, not any of the more detailed information the `Lstat` call provides.  Getting the names can be done with `Readdirnames()`, which doesn't need to involve the nfs server.

@pmorie @eparis @ncdc @derekwaynecarr @saad-ali @thockin @vishh @kubernetes/rh-cluster-infra
2016-10-18 12:37:31 -07:00
Kubernetes Submit Queue 62cc431920 Merge pull request #34944 from jellonek/mac_compatible_copy
Automatic merge from submit-queue

docs generation: Use macOS compatible copying method

Replace option unknown for bsd version of `cp` used on macOS with compatible between systems replacement.

Closes #34890

```release-note
NONE
```
2016-10-18 11:07:10 -07:00
Kubernetes Submit Queue a5da5c0952 Merge pull request #34946 from jellonek/macos_compatible_copying
Automatic merge from submit-queue

utils: Use macOS copatible copying method

Same as in #34944, releated to #34890

```release-note
NONE
```
2016-10-18 11:07:01 -07:00
Kubernetes Submit Queue b77e13444f Merge pull request #34939 from wojtek-t/throttle_retried_requests
Automatic merge from submit-queue

Throttle retried requests in client

Fix #34938
2016-10-18 10:08:53 -07:00
deads2k 2c42936703 fix more RS controller flakes 2016-10-18 12:58:48 -04:00
Kubernetes Submit Queue 6ea0d05ad0 Merge pull request #34876 from ibm-contribs/var-flannel-backend
Automatic merge from submit-queue

Added option to specify the flannel backend, to cluster/ubuntu

```release-note
```

Generalized the cluster/ubuntu scripting so that there is a way to
specify the Flannel "backend" to use.

Also updated the default setting of ADMISSION_CONTROL, to match that
recommended for the latest release in
http://kubernetes.io/docs/admin/admission-controllers/#is-there-a-recommended-set-of-plug-ins-to-use,
and updated the comment on that setting to explain it.

Also made `cluster/ubuntu/reconfDocker.sh` sensitive to the `DEBUG` envar.
2016-10-18 09:26:27 -07:00
Kubernetes Submit Queue 01c31b380d Merge pull request #34997 from vmware/fix-kube-vsphere.kerneltime
Automatic merge from submit-queue

Fix kube vsphere.kerneltime

<!--  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 fixes kube-up to correctly install and configure on vSphere and avoid panics when only a single ESX(hypervisor) is used instead of a cluster.

**Which issue this PR fixes** 
fixes #34992
fixes #34847

**Special notes for your reviewer**:

We plan to cherry pick this into 1.4 release branch as well Ref: https://github.com/kubernetes/kubernetes/pull/34993
2016-10-18 09:26:18 -07:00
Kubernetes Submit Queue c592a46e16 Merge pull request #28300 from pweil-/psp-seccomp
Automatic merge from submit-queue

Add PSP support for seccomp profiles

Seccomp support for PSP.  There are still a couple of TODOs that need to be fixed but this is passing tests.

One thing of note, since seccomp is all being stored in annotations right now it breaks some of the assumptions we've stated for the provider in terms of mutating the passed in pod.  I've put big warning comments around the pieces that do that to make sure it's clear and covered the rollback in admission if the policy fails to validate.

@sttts @pmorie @erictune @smarterclayton @liggitt
2016-10-18 09:26:09 -07:00
Kubernetes Submit Queue 6e1bb2d2f7 Merge pull request #35024 from gmarek/mount_disk
Automatic merge from submit-queue

Mount master-pd in kubemark

Fix #35020
2016-10-18 08:03:47 -07:00
Kubernetes Submit Queue 66a0aa64c2 Merge pull request #32778 from deads2k/controller-doc
Automatic merge from submit-queue

recommendations for writing controllers

There have been questions about how to write controllers.  Many of the gotchas are not obvious to new authors.  This doc tries to help explain the common pitfalls.

@lavalamp @smarterclayton @kubernetes/rh-cluster-infra @kargakis ptal
2016-10-18 07:20:46 -07:00
Kubernetes Submit Queue e62a8b9167 Merge pull request #34962 from deads2k/cotnroller-08-rs-controller
Automatic merge from submit-queue

convert replica set controller to shared informer

Switches the replicaset to a shared informer.

@kargakis fyi
2016-10-18 07:20:37 -07:00
Seth Jennings da3683e2b7 kubelet: storage: don't hang kubelet on unresponsive nfs 2016-10-18 08:45:40 -05:00
Kubernetes Submit Queue 2f990ac429 Merge pull request #34979 from deads2k/tpr-04-storage-post-hook
Automatic merge from submit-queue

convert TPR controller to posthook instead of disable flag

Converts the third party resource controller into a posthook using a loopback client instead going direct to etcd.  This let's us eliminate more flags and special-casing during initialization.  Also, using a client brings us closer to building this without side-effects for downstream composers.
2016-10-18 06:39:41 -07:00
davidwalter0 79e4c120a6 update oscodenames supporting systemd 2016-10-18 09:37:40 -04:00
deads2k aee54ae57e add optional mutation checks for shared informer cache 2016-10-18 09:19:38 -04:00
deads2k be5f3f3324 recommendations for writing controllers 2016-10-18 09:02:44 -04:00
Kubernetes Submit Queue 1dfae3633d Merge pull request #34981 from deads2k/cli-03-supress-error
Automatic merge from submit-queue

glog non-fatal, usually unimportant error instead of fmt

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

This particular message isn't usually important, so demote it to glog.
2016-10-18 05:59:14 -07:00
Kubernetes Submit Queue 6e2f5f8f6d Merge pull request #28742 from jessfraz/test-go1.7rc1
Automatic merge from submit-queue

Update to go 1.7

<!--
Checklist for submitting a Pull Request

Please remove this comment block before submitting.

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
3. If you want this PR to automatically close an issue when it is merged,
   add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>`
   to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests).
4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below.
-->

Closes #33070
Closes #32999

```release-note
Updated Go to 1.7
```


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

This is to test go version 1.7
2016-10-18 05:59:04 -07:00
deads2k b471398f1f convert replica set controller to shared informer 2016-10-18 08:13:37 -04:00
Kubernetes Submit Queue 67732d7383 Merge pull request #34967 from deads2k/api-27-fix-version
Automatic merge from submit-queue

make version an explicit choice so zero config and customized work

Makes `/version` key off of setting the version.  This allows composers to add a version that is correct.
2016-10-18 05:07:02 -07:00
deads2k ea1eefa7ff glog non-fatal, usually unimportant error instead of fmt 2016-10-18 07:58:20 -04:00
Kubernetes Submit Queue bcbdcd17f3 Merge pull request #34685 from resouer/eclass-2
Automatic merge from submit-queue

Refactor scheduler to enable switch on equivalence cache

Part 2 of #30844 

Refactoring to enable easier switch on of equivalence cache.
2016-10-18 04:21:33 -07:00
Kubernetes Submit Queue 27a7c01bce Merge pull request #34975 from deads2k/api-29-dead-fields
Automatic merge from submit-queue

remove write only field

Happened upon a completely dead field.
2016-10-18 03:35:37 -07:00
Kubernetes Submit Queue 94d6ba10b5 Merge pull request #33947 from kubernetes/foxish-patch-1
Automatic merge from submit-queue

Updating labels.yaml to add labels: cncf-cla:yes and cncf-cla:no

<!--  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 is the counterpart of https://github.com/kubernetes/contrib/pull/1764

**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**:

**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`. 
-->
```release-note
NONE
```

cc @kubernetes/contributor-experience @bgrant0607
2016-10-18 03:35:29 -07:00
Kubernetes Submit Queue e6cc8ff149 Merge pull request #34498 from mml/remotecommand-golint
Automatic merge from submit-queue

Fix lint error in remotecommand.go

Before:

```
pkg/client/unversioned/remotecommand/remotecommand.go:101:9: should omit type http.RoundTripper from declaration of var rt; it will be inferred from the right-hand side

Please fix the above errors. You can test via "golint" and commit the result.
```
2016-10-18 03:35:21 -07:00
Kubernetes Submit Queue 16fa327b39 Merge pull request #34955 from jszczepkowski/hpa-fix2
Automatic merge from submit-queue

HPA: fixed wrong count for target replicas calculations.

```release-note
HPA: fixed wrong count for target replicas calculations (#34821).
```

HPA: fixed wrong count for target replicas calculations (#34821).
2016-10-18 03:35:12 -07:00
Kubernetes Submit Queue 5b0edbd56d Merge pull request #34991 from yujuhong/disable_misc
Automatic merge from submit-queue

e2e: stop tracking resource usage for the "misc" container

There is e2e test checking the resource usage of "misc", and it is not
supported on GCI.
2016-10-18 02:48:44 -07:00
gmarek 6b7ddc56d3 Mount master-pd in kubemark 2016-10-18 11:25:17 +02:00
Klaus Ma 4b6cd9aece Removed empty line. 2016-10-18 17:14:05 +08:00
Piotr Skamruk edd311f7cd docs generation: Use macos compatible copy method
Closes #34890
2016-10-18 11:11:03 +02:00
Piotr Skamruk b45dfd5e8f utils: Use macOS copatible copying method
Same as in #34944, releated to #34890
2016-10-18 11:09:38 +02:00
Kubernetes Submit Queue 88c11d4b79 Merge pull request #34995 from timstclair/summary-test
Automatic merge from submit-queue

Delete old summary test

Revert https://github.com/kubernetes/kubernetes/pull/33779 now that the new test is moved out of [Flaky] (https://github.com/kubernetes/kubernetes/pull/34631)
2016-10-18 02:00:45 -07:00
Jerzy Szczepkowski f495e7322c HPA: fixed wrong count for target replicas calculations.
HPA: fixed wrong count for target replicas calculations (#34821).
2016-10-18 10:20:27 +02:00
Kubernetes Submit Queue 6a1e8c98e0 Merge pull request #34989 from caesarxuchao/new-client-go-structure
Automatic merge from submit-queue

New client-go structure

This PR is part of restructuring client-go (https://github.com/kubernetes/client-go/issues/9#issue-181545998). In short, the top-level folder for client-go versions are removed.

This PR also runs copy.sh to pick up changes in the main repository. The number of files in client-go has increase from 1361 files to 1405.

@mbohlool @mml @timoreimann
2016-10-18 01:13:50 -07:00
Jan Safranek 2b2508ba15 Remove PV annotations for Gluster provisioner.
Don't store Gluster SotrageClass parameters in annotations, it's insecure.
Instead, expect that there is the StorageClass available at the time
when it's needed by Gluster deleter.
2016-10-18 09:54:35 +02:00
Kubernetes Submit Queue a47ac1fa30 Merge pull request #34972 from jessfraz/add-remote-settings-to-cp-script
Automatic merge from submit-queue

hack/: update cherry-pick script to have settings to override remote names

**What this PR does / why we need it**: 
it allows you to override the remote names for the cherry-pick script in case you have it named differently
2016-10-18 00:27:21 -07:00
Salvatore Dario Minonne a745872b94 To add service account informer 2016-10-18 09:24:54 +02:00
Kubernetes Submit Queue c19569f03f Merge pull request #34502 from fabianofranz/cli_usability_improvements
Automatic merge from submit-queue

Improvements to CLI usability and maintainability

Improves `kubectl` from an usability perspective by

1. Fixing how we handle terminal width in help. Some sections like the flags use the entire available width, while others like long descriptions breaks lines but don't follow a well established max width (screenshot below). This PR adds a new responsive writer that will adjust to terminal width and set 80, 100, or 120 columns as the max width, but not more than that given POSIX best practices and recommendations for better readability.
![terminal_width](https://cloud.githubusercontent.com/assets/158611/19253184/b23a983e-8f1f-11e6-9bae-667dd5981485.png)
2. Adds our own normalizers for long descriptions and cmd examples which allows us better control about how things like lists, paragraphs, line breaks, etc are printed. Features markdown support. Looks like `templates.LongDesc` and `templates.Examples` instead of `dedent.Dedend`.
3. Allows simple reordering and reuse of help and usage sections.
3. Adds `verify-cli-conventions.sh` which intends to run tests to make sure cmd developers are using what we propose as [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md). Just a couple simple tests for now but the framework is there and it's easy to extend.
4. Update [kubectl conventions](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md) to use our own normalizers instead of `dedent.Dedent`.

**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`. 
-->
```release-note
Improves how 'kubectl' uses the terminal size when printing help and usage.
```

@kubernetes/kubectl
2016-10-17 23:41:23 -07:00
Kubernetes Submit Queue 3193bedb33 Merge pull request #34948 from wojtek-t/avoid_unnecessary_allocation
Automatic merge from submit-queue

Avoid unnecessary allocation

This is supposed to avoid unnecessary memory allocations.

PodToSelectableFields seems to be the biggest contributor to memory allocations:
```
Showing top 10 nodes out of 247 (cum >= 83166442)
      flat  flat%   sum%        cum   cum%
1796823715 31.09% 31.09% 1796823715 31.09%  k8s.io/kubernetes/pkg/registry/core/pod.PodToSelectableFields
 530856268  9.19% 40.28%  530856268  9.19%  k8s.io/kubernetes/pkg/storage.NamespaceKeyFunc
 241505351  4.18% 44.46%  241505351  4.18%  reflect.unsafe_New
...
```
2016-10-17 22:54:26 -07:00
Kubernetes Submit Queue 7414cafbeb Merge pull request #34860 from mbohlool/optional
Automatic merge from submit-queue

+optional tag for OpenAPI spec

OpenAPI rely on "omitempty" json tag to determine if a field is optional or not. This change will add "+optional" tag to all fields with "omitempty" json tag and support the tag in OpenAPI spec generator.
2016-10-17 22:07:00 -07:00
Kubernetes Submit Queue ff8f29b724 Merge pull request #33708 from aaronlevy/no-cache
Automatic merge from submit-queue

Do not cache hyperkube package installation

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

The hyperkube build process could use a cached layer containing out of date packages. For example, the v1.4.0 image contains packages with security vulnerabilities, which should have been available as of the release build date.

This was surfaced from quay.io/clair scanning the hyperkube images:

17bc61b54e047da8cd1b23316aac6961db?tab=vulnerabilities

This patch adds a cache-busting comment to the RUN command which installs/updates packages.
2016-10-17 21:21:05 -07:00