Commit Graph

37635 Commits (10c0c9fa02c9a8057fa58c8047ce8a501981de95)

Author SHA1 Message Date
Clayton Coleman 4324e39393
Flag all packages as needing defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman ca6fc3a68b
Update makefile to generate defaulters 2016-10-18 21:07:33 -04:00
Clayton Coleman 1c49fc57ed
Create a generator for defaulters
Given an object that wishes to have a top level defaulter, traverse the
object looking for nested fields that have defaulters and generate a
single function for that type that invokes all defaulters. The function
will have the name `SetObjectDefaults_NAME`.

Types use `// +k8s:defaulter-gen=true` to indicate they wish a defaulter
generated. If a function already exists with the desired name
`SetObjectDefaults_NAME` then no generation will occur. At a package
level, authors can bulk select the types to generate by setting the
value of the comment to the name of a field - all objects with that
field name without `// +k8s:defaulter-gen=false` defined on the type
will get a defaulter.

Because the defaulting behavior from conversions happens recursively,
all defaulters are expected to be invoked. We call these defaulters
"non-covering" (other defaulters may be invoked beneath them). The
defaulters we generate, by comparison, are "covering" - no nested
defaulters should be invoked. To distinguish between these two types, we
introduce the `// +k8s:defaulter-gen=covers` comment on a defaulter
function which will instruct the generator that the function should
terminate recursion.

This sets the stage for future defaulter generation from comments by
subsuming our existing generators
2016-10-18 21:07:32 -04:00
Clayton Coleman 5062406b77
Hand generated conversion should check nil 2016-10-18 21:07:32 -04:00
Clayton Coleman 0aa8da19a9
Move old defaulters to public functions
Also make Deployment defaulting resilient to fuzzing
2016-10-18 21:07:32 -04:00
Clayton Coleman 68a9983ec7
Add a new Default() method on Scheme
Allow defaulter functions to be registered with the scheme.
2016-10-18 21:07:32 -04:00
Clayton Coleman 85368d070b
bump(k8s.io/gengo):4a9ebbace691333e73f9978d798b1bad6c53a50d 2016-10-18 21:07:28 -04:00
Matt Liggett c04ab43df5 Wait for all pods to be running before checking PDB status.
Hoping to avoid timeout errors as in #34032.
2016-10-18 18:01:27 -07:00
Dawn Chen 6339b32a93 Collect resource usage test with 0 pod for node benchmark. 2016-10-18 17:38:09 -07:00
Kubernetes Submit Queue b844a0722c Merge pull request #35060 from ixdy/get-kube-binaries-script
Automatic merge from submit-queue

Add option to get-kube-binaries.sh to download and extract tests

A follow-on to #33701.

My goal is to use `cluster/get-kube.sh` and `cluster/get-kube-binaries.sh` instead of the custom download/extraction logic in `e2e-runner.sh`. In addition to simplifying the logic, it'll also allow me to properly test removing the arch-specific binaries from `kubernetes.tar.gz`.

Anyone on @kubernetes/test-infra-maintainers want to take a look?
2016-10-18 17:03:44 -07:00
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
ymqytw 3bd3c9570f fix test 2016-10-18 16:01:51 -07:00
ymqytw 7922a2a105 wait until the pods are deleted completely 2016-10-18 16:01:51 -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
derekwaynecarr 555231fad7 PVC informer lister supports listing 2016-10-18 14:36:33 -04: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