Commit Graph

15599 Commits (5f4c8c241e799cc7aec86c34fe02fd213113f91f)

Author SHA1 Message Date
Daniel Smith db3e549bd1 more usages of go2idl 2016-09-22 13:42:46 -07:00
Kubernetes Submit Queue 3149a2b7c6 Merge pull request #33286 from PhilibertDugas/fix/32747_stacktrace-log-from-apiserver
Automatic merge from submit-queue

Apiserver don't log stacktrace when proxying

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

When we are proxying unexpected status from a service or a pod, we print the stack traces (which is not the wanted behaviour). This is an attempt at fixing the issue #32747,

With the `RequestInfoResolver` struct, it's possible to inspect the request and get the `Verb`. In this case, the `proxy` value is what I was looking for to avoid logging stack traces.

I'm wrapping the `.Log()` call with an `if` statement to remove all stack traces logging when the call is a proxy from a service or a pod

Another approach would have been to add another kind of `StacktracePred` in the `httplog` package. I found this path to be trickier to code as it's currently only accepting int values.

**Which issue this PR fixes** : fixes #32747

**Special notes for your reviewer**: N/A

**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
```
2016-09-22 13:05:21 -07:00
Kubernetes Submit Queue e9f4db2748 Merge pull request #27714 from jsafrane/event-recycle
Automatic merge from submit-queue

Send recycle events from pod to pv.

This allows users to diagnose what's wrong with recycler. Recycler pods are started automatically with a cryptic name and they are deleted immediately when they finish.

e.g, `kubectl describe pv` could show that NFS cannot be mounted (and how many pods have tried it):

```
  FirstSeen     LastSeen        Count   From                            SubobjectPath   Type            Reason          Message
  ---------     --------        -----   ----                            -------------   --------        ------          -------
  59m           59m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(5421800e-347b-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  53m           53m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(3c9809e5-347c-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  46m           46m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(250dd2a2-347d-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  40m           40m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(0d84ea33-347e-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  33m           33m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(f5fb63bf-347e-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  27m           27m             1       {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Unable to mount volumes for pod "recycler-for-nfs_default(de7128fd-347f-11e6-a79b-3c970e965218)": timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  1h            3m              75      {persistentvolume-controller }                  Normal          RecyclerPod     Recycler pod: Successfully assigned recycler-for-nfs to 127.0.0.1
  1h            3m              76      {persistentvolume-controller }                  Normal          RecyclerPod     Recycler pod: Pod was active on the node longer than specified deadline
  1h            1m              12      {persistentvolume-controller }                  Warning         RecyclerPod     Recycler pod: Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "recycler-for-nfs"/"default". list of unattached/unmounted volumes=[vol]
  20m           1m              4       {persistentvolume-controller }                  Warning         RecyclerPod     (events with common reason combined)
```

These steps were necessary:

- added event watcher to volume.RecycleVolumeByWatchingPodUntilCompletion
- pass all these events through volume plugins to volume controller
- rework volume.RecycleVolumeByWatchingPodUntilCompletion unit tests to a table (too much copy-paste)
- fix all unit tests along the way
2016-09-22 12:18:53 -07:00
Yu-Ju Hong c43a106b26 Move ConvertPodStatusToRunningPod back to the kubelet/container package
This avoids unnecessary imports between of kuberuntime from dockertools/rkt,
which implements the same kubecontainer.Runtime interface.
2016-09-22 12:13:44 -07:00
Clayton Coleman 97c35fcc67
Allow garbage collection to work against different API prefixes
The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.
2016-09-22 15:00:58 -04:00
Jordan Liggitt ec200a9edf
Remove duplicated ECDHE key handling 2016-09-22 14:52:10 -04:00
Kubernetes Submit Queue 4ab5a76338 Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient
Automatic merge from submit-queue

switch controller manager to generated clients

Switches the controller manager to generated clients.

@ncdc ptal
2016-09-22 11:37:01 -07:00
Kubernetes Submit Queue 5b609f212c Merge pull request #32126 from intelsdi-x/kvm_fw
Automatic merge from submit-queue

Add port forwarding for rkt with kvm stage1

Port forwarding for rkt kvm using `socat`.
cc @yifan-gu @euank @pskrzyns @lukasredynk
2016-09-22 10:57:09 -07:00
deads2k 43db7c0c44 generated code that was missing before 2016-09-22 13:30:42 -04:00
deads2k e85ecc98dd update broken versions for client gen 2016-09-22 13:30:41 -04:00
deads2k 7a8fa18116 update generation scripts to share API group version constants 2016-09-22 13:30:41 -04:00
Philibert Dugas b557acf987
Update for the PR feedback 2016-09-22 13:30:04 -04:00
Kubernetes Submit Queue a8053c7c59 Merge pull request #33238 from mbohlool/openapi
Automatic merge from submit-queue

Move openapi common code to genericapiserver/openapi/common

a follow up to #32622

Reference: #13414
2016-09-22 10:20:48 -07:00
Kubernetes Submit Queue 46123a1694 Merge pull request #33112 from vishh/fix-qos
Automatic merge from submit-queue

Ignore opaque or counted resources from Pod QoS

Fixes #33108
2016-09-22 09:09:05 -07:00
Philibert Dugas 9c2705a5a2
Apiserver don't log stacktrace when proxying
Attempt at closing #32747,

With the `RequestInfoResolver` struct, it's possible to inspect the
request and get the `Verb`. In this case, the `proxy` value is what I
was looking for to avoid logging stacktraces.

I'm wrapping the `.Log()` call with an `if` statement to remove all
stacktrace logging when we proxied through the apiserver

Another approach would have been to add another kind of
`StacktracePred` in the `httplog` package. I found this path to be
trickier to code as it's currently only accepting int values.
2016-09-22 12:08:06 -04:00
Kubernetes Submit Queue 6e25117891 Merge pull request #32655 from dshulyak/fix_node_fake_update
Automatic merge from submit-queue

Fix FakeNodeHandler Update behaviour

Two problems:
1. Get is always using Existing nodes slice, and you will for sure miss any updated data
2. Each Update adds a duplicate node entry to UpdatedNodes slice

For the 1st, we will try to find a node in UpdatedNodes slice (same as for the List).
2nd - append only if there is no node with same name as updated, if there is we will replace object in UpdatedNodes slice.
2016-09-22 07:43:18 -07:00
Kubernetes Submit Queue f230e6c7bc Merge pull request #33007 from smarterclayton/fix_versioned_event
Automatic merge from submit-queue

Correct versioned.Event output in Swagger

Fixes #24240

```release-note
The value of the `versioned.Event` object (returned by watch APIs) in the Swagger 1.2 schemas has been updated from `*versioned.Event` which was not expected by many client tools. The new value is consistent with other structs returned by the API.
```
2016-09-22 07:03:28 -07:00
deads2k 7ee5b26ad1 incorrect key determination 2016-09-22 09:55:24 -04:00
Marcin Maciaszczyk d2a288de6a Remove kubectl namespace command 2016-09-22 15:46:20 +02:00
Kubernetes Submit Queue b60df6c312 Merge pull request #33228 from yujuhong/pull_throttling
Automatic merge from submit-queue

Move image pull throttling logic to pkg/kubelet/images

This is part of #31458

This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.

/cc @kubernetes/sig-node
2016-09-22 06:23:39 -07:00
deads2k f6882e8465 remove storage related fields from genericapiserver 2016-09-22 09:21:34 -04:00
deads2k 483af28944 fix up service lister 2016-09-22 09:12:37 -04:00
Kubernetes Submit Queue aa935bb8a4 Merge pull request #33170 from soltysh/audit_improvements
Automatic merge from submit-queue

Remove closing audit log file and add error check when writing to audit

This picks the order fix from #33164. Additionally I've removed entirely closing the log file, since it didn't make sense where it was. I've also added error checks when actually writing to audit logs.

@sttts ptal

**1.4 justification:**

Risk: the code only runs if auditing is enabled with an apiserver flag. So the risk is low.
Rollback: nothing should depend on this
Cost: the auditing feature is broken because the impersonation filter is applied before and you might not see the proper user when using `--as` flag. Additionally no errors are logged if writing to audit fails.
2016-09-22 05:06:33 -07:00
Dr. Stefan Schimanski c727e27602 Reduce genericapiserver api surface 2016-09-22 13:43:32 +02:00
Dr. Stefan Schimanski 34365c1edd Make genericapiserver.PostStartHooks private 2016-09-22 12:38:47 +02:00
Kubernetes Submit Queue 5af04d1dd1 Merge pull request #32876 from errordeveloper/more-cert-utils
Automatic merge from submit-queue

Refactor cert utils into one pkg, add funcs from bootkube for kubeadm to use

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

We have ended-up with rather incomplete and fragmented collection of utils for handling certificates. It may be worse to consider using `cfssl` for doing all of these things, but for now there is some functionality that we need in `kubeadm` that we can borrow from bootkube. It makes sense to move the utils from bookube into core, as discussed in #31221.

**Special notes for your reviewer**: I've taken the opportunity to review names of existing funcs and tried to make some improvements in that area (with help from @peterbourgon).

**Release note**:

```release-note
NONE
```
2016-09-22 01:29:46 -07:00
Kubernetes Submit Queue e115a4282d Merge pull request #33169 from deads2k/api-12-move-groups
Automatic merge from submit-queue

move registry packages for all API groups

This continues the pattern of `registry/<group>/resource` for our backing storage.  This entire pull is nothing but moves.  I'll reswizzle the actual storage next, but these are cargo-culted everywhere, so I want to lay this down early.

@sttts @ncdc
2016-09-22 00:51:59 -07:00
Kubernetes Submit Queue c46bc88f04 Merge pull request #31491 from dims/fixes-issue-13598
Automatic merge from submit-queue

Allow secure access to apiserver from Admission Controllers

* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-21 21:31:56 -07:00
Kubernetes Submit Queue fee69eedbf Merge pull request #33141 from liggitt/tls-config-mutation
Automatic merge from submit-queue

don't mutate original master->kubelet TLS config

fixes https://github.com/kubernetes/kubernetes/issues/33140

```release-note
Resolves x509 verification issue with masters dialing nodes when started with --kubelet-certificate-authority
```
2016-09-21 19:22:46 -07:00
Yu-Ju Hong ee5b6a2550 Move image pull throttling logic to kubelet/images
This allows runtimes in different packages (dockertools, rkt, kuberuntime) to
share the same logic. Before this change, only dockertools support this
feature. Now all three packages support image pull throttling.
2016-09-21 18:31:04 -07:00
mbohlool c25ecc43ab Move openapi common code to genericapiserver/openapi/common 2016-09-21 17:01:54 -07:00
Antoine Pelisse 938872582e Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
Chao Xu a4e62297d6 fix tests 2016-09-21 14:44:39 -07:00
deads2k 561f8d75a5 move core resource registry packages 2016-09-21 10:11:50 -04:00
juanvallejo 7000e2cf4f
add resource handling before printing
Resources are currently filtered (in order to prevent printing) at print
time in their HumanReadablePrinter handlers. This design makes it not
possible to filter objects when they are printed using any other
printer, such as YAML, JSON, or the NamePrinter.

This patch removes any filters previously added at the printer level for
pods and adds a way to define resource-specific filters before they are
sent to a printer handler. A woking filter handler for pods has also
been
implemented.

Filters affect resources being printed through the HumanReadablePrinter,
YAML, JSON, and `--template` printers.
2016-09-21 10:03:59 -04:00
Maciej Szulik 5873c2679c Remove closing audit log file and add error check when writing to audit 2016-09-21 15:23:38 +02:00
deads2k e9c1b87b80 move extensions registry packages 2016-09-21 09:14:38 -04:00
deads2k 7ee8596a02 refactor small API group packages 2016-09-21 09:14:38 -04:00
Kubernetes Submit Queue 313ef63993 Merge pull request #32680 from sttts/sttts-gracefully-kubectl-without-version
Automatic merge from submit-queue

Behave gracefully in kubectl if /version returns 404

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

It's only about caching the swagger spec here. So it's safe to fall back to non-caching mode and continue.
2016-09-21 04:59:16 -07:00
Kubernetes Submit Queue 2d9d84dc64 Merge pull request #32888 from deads2k/client-10-fixup-remaining-listers
Automatic merge from submit-queue

simplify RC and SVC listers

Make the RC and SVC listers use the common list functions that more closely match client APIs, are consistent with other listers, and avoid unnecessary copies.
2016-09-21 04:13:56 -07:00
Kubernetes Submit Queue 4099a5cc98 Merge pull request #33136 from smarterclayton/default_config
Automatic merge from submit-queue

When client config is default or default is invalid, check ICC

Alternative fix to #33019
2016-09-21 02:21:34 -07:00
Kubernetes Submit Queue 02605106a6 Merge pull request #29505 from kargakis/debug-recreate-flake
Automatic merge from submit-queue

controller: enhance timeout error message for Recreate deployments

Makes the error message from https://github.com/kubernetes/kubernetes/issues/29197 more obvious

@kubernetes/deployment
2016-09-21 01:45:47 -07:00
Kubernetes Submit Queue b245886658 Merge pull request #33058 from MHBauer/dead-interface
Automatic merge from submit-queue

delete private interface with no references in package

<!--  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**:
code quality. 

**Which issue this PR fixes**:
does not fix anything. removes unused interface. 

**Special notes for your reviewer**:
It does not do anything. Let us remove it.

**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
```
2016-09-20 23:35:49 -07:00
YuPengZTE 5865a31e77 'eg.' should be 'e.g.'
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-09-21 14:28:22 +08:00
Clayton Coleman 07f079216e
Make clientcmd defaulting a function of ConfigOverrides and LoadingRules
This commit moves away from using a global variable for default
configuration checking, and instead exposes a method on LoadingRules to
determine whether a particular restclient.Config should be considered
"default". This allows kubectl to provide its own defaults (the same
as before, KUBERNETES_MASTER and the static localhost:8080 values) while
allowing other clients to avoid defining them.

In-cluster config defaulting is now easier to read.
2016-09-21 01:28:06 -04:00
Jordan Liggitt f3c80048f6
don't mutate original client TLS config 2016-09-21 00:57:20 -04:00
Kubernetes Submit Queue 735fca1c03 Merge pull request #32622 from mbohlool/openapi
Automatic merge from submit-queue

Move generated openAPI specs out of genericapiserver and make it configurable

A follow up to #31468

Generated OpenAPI Spec does not belong to genericapiserver package. A new package "generated" created in hope of all generated codes goes into it in future. Openapi folder of that package contains generated definitions and generic API server will accept the definition map as a configuration parameter.

Reference: #13414
2016-09-20 21:42:57 -07:00
Mayank Kumar 822b2d791c fix drain help and make consistent with doc 2016-09-20 21:42:01 -07:00
Kubernetes Submit Queue d323fed024 Merge pull request #33003 from hongchaodeng/etcd_fix2
Automatic merge from submit-queue

stop etcd watcher when watch chan is closed

When startWatching() stops due to the watch chan is closed, the watcher could still keeps running in the background. When this case happen, we should stop the watcher entirely and close ResultChan() too.
2016-09-20 20:21:24 -07:00
Matt Liggett ce0e7586a8 Only approve evictions when budgets would stay enforced after.
Prior to this, we would approve eviction as long as the current state of
the pods matched the budget.  The new version requires that after the
eviction, the pods would still match the budget.

Also update tests to match.
2016-09-20 18:23:50 -07:00
Kubernetes Submit Queue aa5372c5ef Merge pull request #33055 from dchen1107/test1
Automatic merge from submit-queue

Fix backward compatibility issue caused by promoting initcontainers f…

#31026 moves init-container feature from alpha to beta, but only took care the backward compatibility for pod specification, not deal with status. For status, it simply moved from `pods.beta.kubernetes.io/init-container-statuses` to
`pods.beta.kubernetes.io/init-container-statuses` instead of introducing one more pods.beta.kubernetes.io/init-container-statuses. This breaks when the cluster is running with 1.4, but the user is still running with kubectl 1.3.x. 

Fixed #32711
2016-09-20 17:09:20 -07:00
Davanum Srinivas 364dd1a752 New command line flag - Set CA file for apiserver in-process client 2016-09-20 18:59:35 -04:00
Kubernetes Submit Queue c5837baf0e Merge pull request #33117 from luxas/fix_arm_atomics
Automatic merge from submit-queue

Move HighWaterMark to the top of the struct in order to fix arm

I haven't tested this yet, but let's see how e2e tests react.
It should be no difference at all except for that it will fix arm.

etcd has had to do this some times (and I think there are some fixes like this that are needed for etcd as well)

For reference see: https://golang.org/pkg/sync/atomic/

This should be a cherrypick-candidate for v1.4.1 (as I understand it, v1.4.0 has clearly left the cherrypickable state)

@lavalamp @pwittrock @xiang90 @smarterclayton
2016-09-20 15:50:43 -07:00
Kubernetes Submit Queue 0f412bd5ab Merge pull request #33017 from deads2k/api-09-use-meta-factory
Automatic merge from submit-queue

use groupmetafactoryregistry

Switches all groups to the new API registration mechanism.

@ncdc ptal
2016-09-20 15:50:41 -07:00
mbohlool 38b2567d8b Move generated openAPI specs out of genericapiserver and make it configurable 2016-09-20 14:06:10 -07:00
mbohlool 02e0d5ab75 Generated OpenAPI definitions 2016-09-20 14:06:09 -07:00
Kubernetes Submit Queue ad7ba62b24 Merge pull request #32785 from m1093782566/m109-job-controller-hot-loop
Automatic merge from submit-queue

[Controller Manager] Fix job controller hot loop

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

Fix Job controller hotloop on unexpected API server rejections.

**Which issue this PR fixes**

Related issue is #30629

**Special notes for your reviewer:**

@deads2k @derekwaynecarr PTAL.
2016-09-20 13:52:45 -07:00
Hongchao Deng 8e3b40735a stop etcd watcher when watch chan is closed 2016-09-20 12:45:28 -07:00
Lucas Käldström 519379138d Move HighWaterMark to the top of the struct in order to fix 32-bit platforms 2016-09-20 22:44:56 +03:00
Kubernetes Submit Queue 2580157597 Merge pull request #33064 from lojies/spellmistake
Automatic merge from submit-queue

fix a spell mistake

**What this PR does / why we need it**:
this should be "every" not 'ever'

**Which issue this PR 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
```
2016-09-20 12:38:42 -07:00
Kubernetes Submit Queue c24e7b5cba Merge pull request #33101 from hongchaodeng/etcd_fix
Automatic merge from submit-queue

Work around the etcd watch issue

fix #32770

Underlyingly, differentiating context will unshare the grpc stream.
2016-09-20 12:00:21 -07:00
Vishnu kannan 5d4ee244d3 ignore non first class QoS resources from computing Pod Qos
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-20 11:19:31 -07:00
Kubernetes Submit Queue 650715d231 Merge pull request #32903 from yujuhong/enable_docker_shim
Automatic merge from submit-queue

kubelet: Add a hidden flag to enable docker CRI integration for testing
2016-09-20 11:19:26 -07:00
deads2k b83a317003 switch controller manager to generated clientset 2016-09-20 12:53:47 -04:00
deads2k adda69c7ca generated code 2016-09-20 12:53:46 -04:00
Hongchao Deng 28c489654b work around the etcd watch issue 2016-09-20 09:26:47 -07:00
Kubernetes Submit Queue 0e5def2054 Merge pull request #33040 from wongma7/storage-codegen
Automatic merge from submit-queue

Add storage api group to hack/update-codegen.sh

Add it to the script then run it in the second commit. 1.4 needs the same change, I'll do it in my other PR.
2016-09-20 08:48:43 -07:00
Kubernetes Submit Queue 9b87a1b00e Merge pull request #32802 from deads2k/api-06-move-storage
Automatic merge from submit-queue

separate RESTStorage by API group

This demonstrates how we could start separating the description of `RESTStorage` from `pkg/master`.  Each API group owns constructing its own RESTStorage.  Since `pkg/registry` is where we place all packages that create RESTStorage, it seems reason to split the package by `pkg/registry/<api group>/storage` to create RESTStorage and `pkg/registry/<api group>/<resource>` to support each individual resource.

The interface to construct this RESTStorage is dependent upon some `genericapiserver` types now, but we could (should?) move those items to a different location.

@kubernetes/sig-api-machinery 
@lavalamp can you weigh in on how I've split these packages?  I think we agree that we need better segregation, but we haven't spoken about how to spell it.
2016-09-20 08:08:19 -07:00
Davanum Srinivas 25d4a70827 Allow secure access to apiserver from Admission Controllers
* Allow options.InsecurePort to be set to 0 to switch off insecure access
* In NewSelfClient, Set the TLSClientConfig to the cert and key files
  if InsecurePort is switched off
* Mint a bearer token that allows the client(s) created in NewSelfClient
  to talk to the api server
* Add a new authenticator that checks for this specific bearer token

Fixes #13598
2016-09-20 10:42:21 -04:00
m1093782566 27cc90cebb fix job controller hot loop
Change-Id: I55ce706381f1494e5cd2064177b938f56d9c356a
2016-09-20 22:25:11 +08:00
Jan Safranek 1adf856735 Use secrets for glusterfs provisioning passwords
- no plain password in StorageClass!
- fix the style along the way
- use PV annotations to pass the configuration from provisioners to deleters
2016-09-20 16:24:30 +02:00
Michail Kargakis 59da5385e0 controller: enhance timeout error message for Recreate deployments 2016-09-20 15:53:24 +02:00
deads2k 16fbb47189 fix up service lister 2016-09-20 08:24:33 -04:00
deads2k 185a7adf84 fix RC lister 2016-09-20 08:24:32 -04:00
Kubernetes Submit Queue 4a176600fc Merge pull request #32482 from m1093782566/m109-pet-set-fix-update-bug
Automatic merge from submit-queue

[Pet Set] Fix losing pet updated information between update retries

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

Address #32481

@bprashanth
2016-09-20 05:16:04 -07:00
deads2k a2a6423574 separate RESTStorage by API group 2016-09-20 08:00:50 -04:00
deads2k 6f745a2107 use groupmetafactoryregistry 2016-09-20 07:39:40 -04:00
Kubernetes Submit Queue 1070a51830 Merge pull request #31388 from yifan-gu/fix_kubenet_getRunningPods
Automatic merge from submit-queue

kubenet: SyncHostports for both running and ready to run pods.

This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.

Fix https://github.com/kubernetes/kubernetes/issues/27975 

Originally discussed in https://github.com/kubernetes/kubernetes/pull/27914#issuecomment-228140108

cc @euank @freehan @dcbw
2016-09-20 04:24:41 -07:00
PingWang de6a2452fa combine var
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2016-09-20 16:56:25 +08:00
Kubernetes Submit Queue c97246247a Merge pull request #30199 from dims/re-add-roadmap-extend-all
Automatic merge from submit-queue

Extend all to more resources

Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-20 01:49:45 -07:00
Kubernetes Submit Queue 76f2ddf4e8 Merge pull request #32292 from pmorie/subresource-fake
Automatic merge from submit-queue

Add godoc on using FakeClient with subresources

Add a little godoc on using FakeClient with subresources, hoping to prevent future occurences of #32127.
2016-09-19 23:51:23 -07:00
lojies 0d675fff04 add err to return 2016-09-20 14:47:31 +08:00
Kubernetes Submit Queue 8d0518d4d2 Merge pull request #32897 from deads2k/api-07-remove-dead-mapper
Automatic merge from submit-queue

remove dead mapper

Removing a write-only field I found looking at the registration code.
2016-09-19 23:12:06 -07:00
Random-Liu 08d74f33f6 Add client version. 2016-09-19 21:27:00 -07:00
Kubernetes Submit Queue 2941069307 Merge pull request #32894 from deads2k/cli-01-remove-arg
Automatic merge from submit-queue

make --include-extended-apis deprecated and remove plumbing

Marks a dead CLI parameter as deprecated and removes the plumbing for it.
2016-09-19 21:11:04 -07:00
d00369826 3de4695057 fix petset update(pet) retries bug
Change-Id: I92e2b653ab78fca72ae41cf87945d90fbbc67f44
2016-09-20 11:35:58 +08:00
Kubernetes Submit Queue b4d5177c23 Merge pull request #32816 from pmorie/kubelet-godoc
Automatic merge from submit-queue

Add missing kubelet godoc

Adds some missing godoc to Kubelet, which I found while triaging a bug.
2016-09-19 20:33:21 -07:00
lojies 5c532dc683 fix a spell mistake 2016-09-20 11:21:25 +08:00
Kubernetes Submit Queue aa60583ea1 Merge pull request #33001 from kargakis/fix-requeueing-in-csr-controller
Automatic merge from submit-queue

controller: a couple of fixes for csr

Fixes:
* delete resource handler wasn't taking into account tombstones
* csr would requeue twice on update failure

@deads2k @mikedanese ptal
2016-09-19 17:13:46 -07:00
Morgan Bauer fa28ee8683
delete private interface with no references in package 2016-09-20 00:13:16 +00:00
Dawn Chen 4c4623e5be Fix backward compatibility issue caused by promoting initcontainers from alpha to beta. 2016-09-19 16:33:25 -07:00
Kubernetes Submit Queue 3802a9ba35 Merge pull request #31529 from deads2k/rbac-05-bootstrapping
Automatic merge from submit-queue

add GenericAPIServer posthooks for initialization

Adds the concept of a `PostStartHook` to the `GenericAPIServer` to allow post-server start hooks.  This gives a standard location to perform post-start bootstrapping tasks.  The common case usage we have downstream are security related bootstrapping tasks that are performed on the "empty etcd" initialization cases.  The RBAC authorizer is a good example of this in kube.  It needs a location to create default policies to start a server which is capable of being accessed.

Kube is also likely to hit this for things like PSP and breaking the monolithic controller user into separate, scoped service accounts.

@kubernetes/sig-api-machinery for the `GenericAPIServer` bits
@kubernetes/sig-auth for the particular clusterrole bootstrapping. I've only done one to start, but I suspect we'll start making more and probably introduce a binding so that the RBAC super-user doesn't remain a special case forever.
2016-09-19 16:29:26 -07:00
Clayton Coleman c0b9528365
Pass a value for versioned.Event, not a pointer 2016-09-19 18:33:45 -04:00
Kubernetes Submit Queue 30ff1f495a Merge pull request #32914 from yujuhong/limit_names
Automatic merge from submit-queue

Limit the number of names per image reported in the node status

This fixes #32908
2016-09-19 15:10:52 -07:00
Kubernetes Submit Queue 80f0f82903 Merge pull request #32934 from yifan-gu/fix_pod_sandbox
Automatic merge from submit-queue

CRI: Add missing sandbox in runningPod.

Add a container that represents pod sandbox when converting the
pod status to runningPod.

Without the change, `kubeGenericRuntimeManager.killPodWithSyncResult()` will not kill any sandboxes.

cc @feiskyer @Random-Liu @yujuhong
2016-09-19 13:48:40 -07:00
Yu-Ju Hong bd357e9761 Various fixes to enable kubelet to switch to kuberuntime/dockershim 2016-09-19 13:09:00 -07:00
Yu-Ju Hong 1c3c1ac514 kubelet: Add a hidden flag to enable docker CRI integration
The new flag, if specified, and if --container-runtime=docker, switches
kubelet to use the new CRI implementation for testing. This is hidden flag
since the feature is still under heavy development and the flag may be changed
in the near future.
2016-09-19 13:09:00 -07:00
Kubernetes Submit Queue 4bfebf0add Merge pull request #32907 from hongchaodeng/etcd_fix
Automatic merge from submit-queue

etcd watcher: centralize error handling

We should centralize error handling in watcher in run(). Otherwise this could silently return.

Also we don't need the grpc code checking anymore. It's fixed.
2016-09-19 13:07:11 -07:00
Matthew Wong 7ba1410521 Generate clientset 1.5 2016-09-19 15:54:08 -04:00
deads2k 7d1f13d3e0 add GenericAPIServer posthooks for initialization 2016-09-19 14:58:27 -04:00
Yifan Gu 27d4866c4e CRI: Add missing sandbox in runningPod.
Append containers that represent pod sandboxes when converting the
pod status to runningPod.
2016-09-19 11:52:00 -07:00
Kubernetes Submit Queue a089791f3e Merge pull request #32989 from lojies/fixspellerr
Automatic merge from submit-queue

fix a spell mistake

**What this PR does / why we need it**:
fixed a spell mistake

**Which issue this PR 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
```
2016-09-19 11:41:00 -07:00
Davanum Srinivas e1373cf516 Extend all to more resources
Added more things from the list here:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cmd.go#L159

Update the devel/kubectl-conventions.md with the rules mentioned by
a few folks on which resources could be added to the special 'all' alias
2016-09-19 13:01:59 -04:00
deads2k 4aa61ddcb2 remove dead mapper 2016-09-19 09:57:19 -04:00
m1093782566 2a117798b6 fix disruption hot loop
Change-Id: Ib8eb56cb87f688fe9b2016f574f3fb9b685ce796
2016-09-19 20:50:48 +08:00
Kubernetes Submit Queue 87b40782c9 Merge pull request #31150 from ncdc/handle-init-container-terminated-pod-running-condition
Automatic merge from submit-queue

Check init containers in PodContainerRunning

Sometimes when an init container runs and terminates quickly, PodContainerRunning can go into a
state where the pod indicates it's still running, but the container is already terminated. Handle
that condition by returning ErrContainerTerminated when it happens.

See also #29952

@smarterclayton @fabianofranz
2016-09-19 05:43:21 -07:00
Wojciech Tyczynski a6ef37ece9 Use Informer framework in route controller 2016-09-19 11:53:30 +02:00
Kubernetes Submit Queue aa0e8b9cc1 Merge pull request #31434 from johscheuer/quobyte-dynamic-prov
Automatic merge from submit-queue

Support Quobyte as StorageClass

This PR allows Users to use Quobyte as StorageClass for dynamic volume provisioning and implements the Provisioner/Deleter Interface. 

@quolix @kubernetes/sig-storage @rootfs
2016-09-19 02:39:41 -07:00
Kubernetes Submit Queue 3d82251e92 Merge pull request #32745 from abrarshivani/vsphere_storage_class
Automatic merge from submit-queue

Support for storage class for vSphere volume plugin. Custom disk format for dynamic provisioning.

This PR does following,

1.  Add support for storage class for vSphere volume plugin.
2. Add option for user to provision disk with different disk formats. Format choices are
    "thin" (default), "zeroedthick", "eagerzeroedthick".

Sample storageclass (yaml):
```
kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: slow
provisioner: kubernetes.io/vsphere-volume
parameters:
  diskformat: thin
```
2016-09-19 01:51:15 -07:00
Ilya Dmitrichenko 386fae4592
Refactor utils that deal with certs
- merge `pkg/util/{crypto,certificates}`
- add funcs from `github.com/kubernetes-incubator/bootkube/pkg/tlsutil`
- ensure naming of funcs is fairly consistent
2016-09-19 09:03:42 +01:00
Kubernetes Submit Queue 892a6d7af5 Merge pull request #32937 from philips/document-node-id-fields
Automatic merge from submit-queue

api: types: document NodeSpec ID fields

Document MachineID as the preferred field from the discussion here:
https://groups.google.com/d/msg/kubernetes-sig-node/_3mXXB1ohZs/EuYtCzHvBgAJ

I couldn't get the generated things to update. I ran:

```
hack/update-generated-runtime.sh
hack/update-codegen.sh
hack/update-generated-swagger-docs.sh
hack/update-generated-protobuf.sh
hack/update-codecgen.sh
```

What did I miss?!

cc @dchen1107 @thockin
2016-09-18 21:29:29 -07:00
Michail Kargakis 2fd3c490df controller: a couple of fixes for csr
Fixes:
* delete resource handler wasn't taking into account tombstones
* csr would requeue twice on update failure
2016-09-18 22:48:46 +02:00
Michail Kargakis b87e8c79ca kubectl: move events sorting interface to the api for general use 2016-09-18 19:25:42 +02:00
lojies fc9f029e5a fix a spell mistake 2016-09-18 15:04:59 +08:00
Wojciech Tyczynski 27d75054b3 Avoid unnecessary API calls from GC 2016-09-18 07:09:11 +02:00
Kubernetes Submit Queue 920581d964 Merge pull request #32664 from m1093782566/m109-certificates-hot-loop
Automatic merge from submit-queue

[Controller Manager] Fix certificates controller hotloop and use utilruntime.HandleError to replace glog.Errorf

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

Fix certificates controller hotloop on unexpected API server rejections.

**Which issue this PR fixes** 

Related issue is #30629

**Special notes for your reviewer**:

@deads2k @derekwaynecarr PTAL.

I find there is no unit test for certificates controller, and I will implement unit tests for it later.
2016-09-17 21:00:59 -07:00
Kubernetes Submit Queue 41fc0a4506 Merge pull request #32776 from m1093782566/m109-fix-endpoint-controller-hotloop
Automatic merge from submit-queue

[Controller Manager] Fix endpoint controller hot loop and use utilruntime.HandleError to replace glog.Errorf

<!--  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
-->

**Why**:

Fix endpoint controller hot loop and use `utilruntime.HandleError` to replace `glog.Errorf`

**What**

1. Fix endpoint controller hot loop in `pkg/controller/endpoint`

2.  Fix endpoint controller hot loop in `contrib/mesos/pkg/service`

3. Sweep cases of `glog.Errorf` and use `utilruntime.HandleError` instead.

**Which issue this PR fixes**

Fixes #32843
Related issue is #30629 

**Special notes for your reviewer**:

@deads2k @derekwaynecarr 

The changes on `pkg/controller/endpoints_controller.go` and `contrib/mesos/pkg/service/endpoints_controller.go` are almost the same except `contrib/mesos/pkg/service/endpoints_controller.go` does not pass `podInformer` as the parameter of `NewEndpointController()`. 

So, I didn't wait `podStoreSynced` before `syncService()`(Just leave it as it was). Will it lead to a problem?
2016-09-17 20:01:41 -07:00
Brandon Philips 080b3d0a8c api: types: document NodeSpec ID fields
Document MachineID as the preferred field from the discussion here:
https://groups.google.com/d/msg/kubernetes-sig-node/_3mXXB1ohZs/EuYtCzHvBgAJ
2016-09-17 16:37:29 -07:00
Kubernetes Submit Queue 3aa72fa480 Merge pull request #32926 from kubernetes/revert-32841-revert-32251-fix-oom-policy
Automatic merge from submit-queue

[kubelet] Fix oom-score-adj policy in kubelet

Fixes #32238 

We have been having this regression since v1.3. It is critical for GKE/GCE deployments of k8s because docker daemon has a high likelihood of being OOM killed which will end up nuking all containers. 
The reason for moving from mnt to pid is that docker daemon moves itself into a new mnt namespace with systemd based deployments.
2016-09-17 13:00:20 -07:00
Kubernetes Submit Queue af0b973fba Merge pull request #32885 from janetkuo/kubectl-rollingupdate-garbage-collector-error
Automatic merge from submit-queue

Improve error message when kubectl rolling-update fail due to version skew

<!--  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**: follow up #32751, we should print the real error message first, the workaround later 

**Before:**
```console
$ kubectl rolling-update nginx --image=redis 
Created nginx-6ee4372891ec51a97dfbf83ed0846886
Scaling up nginx-6ee4372891ec51a97dfbf83ed0846886 from 0 to 1, scaling down nginx from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
Scaling nginx-6ee4372891ec51a97dfbf83ed0846886 up to 1
Scaling nginx down to 0
Update succeeded. Deleting old controller: nginx
Renaming nginx-6ee4372891ec51a97dfbf83ed0846886 to nginx
Error from server: Note: if you are using "kubectl rolling-update" and your kubectl version is older than v1.4.0, your rolling-update has probably failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround. : object is being deleted: replicationcontrollers "nginx" already exists
```

**After:** (see the error message)
```console
$ kubectl rolling-update nginx --image=redis
Created nginx-12b5782bcdff627fca46537e9e1045f8
Scaling up nginx-12b5782bcdff627fca46537e9e1045f8 from 0 to 1, scaling down nginx from 1 to 0 (keep 1 pods available, don't exceed 2 pods)
Scaling nginx-12b5782bcdff627fca46537e9e1045f8 up to 1
Scaling nginx down to 0
Update succeeded. Deleting old controller: nginx
Renaming nginx-12b5782bcdff627fca46537e9e1045f8 to nginx
Error from server: object is being deleted: replicationcontrollers "nginx" already exists: if you're using "kubectl rolling-update" with kubectl version older than v1.4.0, your rolling update has failed, though the pods are correctly updated. Please see https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG.md#kubectl-rolling-update for a workaround
```

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

Print the real error message first, the workaround later

@lavalamp @gmarek
2016-09-17 12:20:33 -07:00
Kubernetes Submit Queue 8fd414537b Merge pull request #32823 from nikhiljindal/descNs
Automatic merge from submit-queue

Allow kubectl describe ns to pass if server does not support resource quotas and limit ranges

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

Context: federation-apiserver does not support limit ranges and resource quotas. Hence `kubectl describe ns` fails right now.
Fixing it so that `kubectl describe ns` does not error out and atleast prints information about the namespace.

cc @kubernetes/sig-cluster-federation @kubernetes/kubectl
2016-09-17 04:04:20 -07:00
Klaus Ma d55006d38f Refactor Builder.visitorResult by extra methonds. 2016-09-17 17:36:13 +08:00
Johannes Scheuermann 02db13b620 Update quobyteApiServer to quobyteAPIServer 2016-09-17 10:08:52 +02:00
Kubernetes Submit Queue 9fc8ebdafa Merge pull request #32891 from wojtek-t/route_controller_fix
Automatic merge from submit-queue

Don't update NodeNetworkUnavailable condition if it's already set cor…

Ref #32571
2016-09-17 00:39:34 -07:00
Kubernetes Submit Queue f84e1387a0 Merge pull request #31423 from miaoyq/delete-a-unused-func
Automatic merge from submit-queue

delete a unused function in the 'pkg/kubectl/cmd/util/helpers.go'

Delete the function `getFlag` in the `pkg/kubectl/cmd/util/helpers.go`, because it is not used anywhere in the project.

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-09-16 23:59:47 -07:00
Kubernetes Submit Queue 06fac3b09e Merge pull request #32813 from deads2k/rbac-07-authorizer
Automatic merge from submit-queue

make rbac authorizer use rule comparison, not covers

Updates the rbac authorizer to use rule comparisons and not a covers check to perform authorization.
2016-09-16 23:19:54 -07:00
Kubernetes Submit Queue cd051703b3 Merge pull request #32877 from deads2k/client-09-fixup-lister
Automatic merge from submit-queue

change factorization of listers to make them easier to add

`Listers` have a tremendous amount of duplicate code.  This factors that out.

@smarterclayton ptal.
2016-09-16 22:39:37 -07:00
Yanqiang Miao ed3b3ad47d delete a unused function in the 'pkg/kubectl/cmd/util/helpers.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-09-17 12:43:59 +08:00
Kubernetes Submit Queue 051ee17094 Merge pull request #30815 from ymqytw/refactoring
Automatic merge from submit-queue

Fixes #30562: Refactor kubectl command options to use common struct for common file params

Fixes #30562 : Refactor common go struct options in pkg/kubectl/cmd/*.go.
@pwittrock
2016-09-16 19:48:22 -07:00
Yifan Gu 5389a74388 kubenet: SyncHostports for both running and ready to run pods.
This fixes the race that happens in rktnetes when pod B invokes
'kubenet.SetUpPod()' before another pod A becomes actually running.

The second 'kubenet.SetUpPod()' call will not pick up the pod A
and thus overwrite the host port iptable rules that breaks pod A.

This PR fixes the case by listing all 'active pods' (all non-exited
pods) instead of only running pods.
2016-09-16 17:29:44 -07:00
Abrar Shivani 57180093af Support for storage class for vSphere volume plugin. Custom disk format for dynamic provisioning. 2016-09-16 17:15:38 -07:00
Vish Kannan a1fe3adbc7 Revert "Revert "[kubelet] Fix oom-score-adj policy in kubelet"" 2016-09-16 16:32:58 -07:00
Hongchao Deng 5a4a095e29 etcd watcher: centralize error handling 2016-09-16 15:31:49 -07:00
Yu-Ju Hong 7ada99181c Limit the number of names per image reported in the node status 2016-09-16 15:16:08 -07:00
Kubernetes Submit Queue af3050dd15 Merge pull request #32835 from yujuhong/docker_annotations
Automatic merge from submit-queue

dockershim: support annotations and filtering by sandbox ID
2016-09-16 14:17:03 -07:00
deads2k 862415aaa2 make --include-extended-apis deprecated and remove plumbing 2016-09-16 16:05:52 -04:00
Janet Kuo 30512f909d Improve error message when kubectl rolling-update fail due to version skew
Print the real error message first, the workaround later
2016-09-16 13:00:55 -07:00
deads2k 1943d256d2 make rbac authorizer use rule comparison, not covers 2016-09-16 15:53:42 -04:00
Wojciech Tyczynski d7d6249781 Don't update NodeNetworkUnavailable condition if it's already set correctly 2016-09-16 21:03:20 +02:00
deads2k 1bf17eb4e9 change factorization of listers to make them easier to add 2016-09-16 14:49:00 -04:00
Yu-Ju Hong 73f30b18e4 dockershim: support filter containers by sandbox ID 2016-09-16 11:31:15 -07:00
Yu-Ju Hong 2f60b72dd3 dockershim: add support for annotations 2016-09-16 11:31:15 -07:00
Kubernetes Submit Queue 791116476f Merge pull request #32348 from asalkeld/metrics-nil-spammy
Automatic merge from submit-queue

Disambiguate unsupported metrics from metrics errors

**What this PR does / why we need it**:
Stop logging "metrics are not supported for MetricsNil Volumes" as it spams the log.

**Which issue this PR fixes** 
fixes #20676, fixes #27373

**Special notes for your reviewer**:
None

**Release note**:
```release-note
Don't log "metrics are not supported for MetricsNil Volumes"
```
2016-09-16 11:27:15 -07:00
Yu-Ju Hong 5e318cd749 CRI: add annotations to PodSandbox
Both Container and ContainerStatus includes labels and annotations. PodSandbox
should be consistent with that.
2016-09-16 11:09:24 -07:00
Yu-Ju Hong fd70d94330 dockershim: fix sandbox/container filtering 2016-09-16 11:09:24 -07:00
Kubernetes Submit Queue e5a84398db Merge pull request #32836 from yujuhong/fix_nil_ptr
Automatic merge from submit-queue

kuberuntime: fix nil pointer dereference in killPodWithSyncResult

This fixes #32742
2016-09-16 09:40:03 -07:00
Kubernetes Submit Queue 2ca15b9f76 Merge pull request #32815 from deads2k/controller-02-daemonset-informer
Automatic merge from submit-queue

convert daemonset controller to shared informers

Convert the daemonset controller completely to `SharedInformers` for its list/watch resources.

@kubernetes/rh-cluster-infra @ncdc
2016-09-16 09:39:57 -07:00
Kubernetes Submit Queue 12d916750e Merge pull request #32387 from sttts/sttts-handler-cleanup
Automatic merge from submit-queue

Cleanup non-rest apiserver handlers

- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-16 08:58:06 -07:00
Yu-Ju Hong 18f230c524 kuberuntime: fix nil pointer dereference in killPodWithSyncResult 2016-09-16 08:38:11 -07:00
deads2k 234d68be83 convert daemonset controller to shared informers 2016-09-16 10:40:46 -04:00
Hai Huang 192825bc5e fix a typo 2016-09-16 09:42:29 -04:00
d00369826 a3888335f7 fix endpoint controller hot loop
Change-Id: I0f667006f310fdca6abe324f9ea03537679e9163
2016-09-16 21:41:22 +08:00
Kubernetes Submit Queue a665002d80 Merge pull request #29684 from bprashanth/log_tun
Automatic merge from submit-queue

Change log level to reduce spam

Periodically dumping ips of all nodes in large clusters is a little spammy
2016-09-16 05:51:07 -07:00
Kubernetes Submit Queue e8fbcb1669 Merge pull request #32654 from soltysh/sj_clientset
Automatic merge from submit-queue

Switch ScheduledJob controller to use clientset

**What this PR does / why we need it**:
This is part of #25442. I've applied here the same fix I've applied in the manual client in #29187, see the 1st commit for that (@caesarxuchao we've talked about it in #29856).

@deads2k as promised 
@janetkuo ptal
2016-09-16 05:03:57 -07:00
Johannes Scheuermann 0b7cb5f2ae Inital Quobyte dynamic provision 2016-09-16 13:26:18 +02:00
Kubernetes Submit Queue 0d9685b0b5 Merge pull request #32805 from caesarxuchao/more-gc-optimization
Automatic merge from submit-queue

Add the uid in a delete event to the absentOwnerCache

This is a small optimization to further reduce the traffic sent by the GC.

In #31167, GC caches the non-existent owners when it processes the dirtyQueue. As discovered in #32571, there is still small inefficiency, because there are multiple goroutines processing the dirtyQueue, many of them might send a GET to the apiserver before the cache gets populated.

This PR populates the cache when GC observes an object gets deleted, which happens before the processing of the dirtyQueue, so it avoids the simultaneous GET sent by the GC workers.

cc @lavalamp
2016-09-16 00:40:24 -07:00
Kubernetes Submit Queue dfe3a46672 Merge pull request #31847 from feiskyer/syncpod
Automatic merge from submit-queue

Kubelet: add SyncPod for new runtime API

This PR adds implements of `SyncPod` for new runtime API. Note that init containers is not included, it will in another following PR.

**DO-NOT-MERGE**. Based on #31322 and #31395, only last commit is for review.

CC @yujuhong @Random-Liu and @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-15 22:26:52 -07:00
Kubernetes Submit Queue a39cee990c Merge pull request #32751 from caesarxuchao/specific-error-rolling-update
Automatic merge from submit-queue

Specific error message on failed rolling update issued by older kubectl against 1.4 master

Fix #32706

`kubernetes-e2e-gke-1.4-1.3-kubectl-skew` (1.3 kubectl and 1.4 master) test suite failed with:
```
k8s.io] Kubectl client [k8s.io] Kubectl rolling-update should support rolling-update to same image [Conformance]
...
Error from server: object is being deleted: replicationcontrollers "e2e-test-nginx-rc" already exists error: exit status 1 not to have occurred
```

It's because the old RC had an orphanFinalizer, so it is not deleted from the key-value store immediately. In turn, the creation of the new RC of the same name failed. 

In this failure, the RC and pods are updated, it's just that the RC is of different name, i.e., original name + a hash generated based on podTemplate. The error is confusing to user, but not that bad. So this PR just prints a warning message to instruct users how to work around.

1.4 kubectl rolling-update uses different logic so it's working.

@lavalamp @gmarek @janetkuo @pwittrock 

cc @liggitt for the ctx changes.
2016-09-15 21:41:56 -07:00
Vish Kannan 173fd499cf Merge pull request #32841 from kubernetes/revert-32251-fix-oom-policy
Revert "[kubelet] Fix oom-score-adj policy in kubelet"
2016-09-15 21:12:03 -07:00
Kubernetes Submit Queue a2c186dbd0 Merge pull request #32786 from aofry/issue-32747
Automatic merge from submit-queue

prevent printing of stack trace when proxying 304 requests in api gateway

partially addresses #32747.
2016-09-15 20:58:38 -07:00
Kubernetes Submit Queue 27c093ea90 Merge pull request #32048 from smarterclayton/consistent_errors
Automatic merge from submit-queue

Handle Stream() errors consistently in restclient

We should be following the same rules for Stream() as the normal body
request flow.

Also add slightly more output on a server error - in the future we may
want to clean this up but it's potentially hiding bad responses.

Related to #32009 but isn't the fix (so far)
2016-09-15 20:13:48 -07:00
Vish Kannan 492ca3bc9c Revert "[kubelet] Fix oom-score-adj policy in kubelet" 2016-09-15 19:28:59 -07:00
Kubernetes Submit Queue 0d8db69660 Merge pull request #32831 from hongchaodeng/deb
Automatic merge from submit-queue

etcd3/watcher: logging error

To debug #32770

If error happened, the watcher might just stop/exit silently.
2016-09-15 18:48:39 -07:00
Kubernetes Submit Queue 2c6620b1ee Merge pull request #32563 from ZTE-PaaS/zhangke-patch-045
Automatic merge from submit-queue

Check kubeClient nil in Kubelet and bugfix

1. check kubeClient nil first before using as it maybe nil
2. configMaps and secrets map do not be used properly and should use it as cache
2016-09-15 18:48:34 -07:00
Kubernetes Submit Queue 9a3429829c Merge pull request #32662 from humblec/glusterfs-default-volume
Automatic merge from submit-queue

Change the default volume type of GlusterFS provisioner.

At  present provisioner creates 'Distribute' Volume and  this patch change the default
volume type 'Distribute Replica:(3)' volume.
2016-09-15 18:07:14 -07:00
Hongchao Deng 3e9af272d5 etcd3/watcher: logging error 2016-09-15 17:23:04 -07:00
Chao Xu c4ea205aeb print instruction in case of failed kubectl 1.3 rolling-update against 1.4 cluster 2016-09-15 17:20:39 -07:00
Kubernetes Submit Queue fcc97f37ee Merge pull request #32718 from mikedanese/mv-informer
Automatic merge from submit-queue

move informer and controller to pkg/client/cache

@kubernetes/sig-api-machinery
2016-09-15 16:44:30 -07:00
Kubernetes Submit Queue 5fe3bd449f Merge pull request #30565 from lavalamp/improve-registered
Automatic merge from submit-queue

Centralize install code

Trying to figure out a way to do this that makes the changes as painless to roll out as possible. This is going to be a multi-step process...
2016-09-15 16:03:39 -07:00
Saad Ali cb88d88b3e Merge pull request #32251 from vishh/fix-oom-policy
[kubelet] Fix oom-score-adj policy in kubelet
2016-09-15 15:24:54 -07:00
nikhiljindal b84e53bc2b Allow describe ns to pass if server does not support resource quotas and limit ranges 2016-09-15 15:16:49 -07:00
Kubernetes Submit Queue 1c10f53863 Merge pull request #32493 from deads2k/client-06-discoveryrestmapper
Automatic merge from submit-queue

use discovery restmapper for kubectl

Updates the `kubectl` factory to use a discovery rest mapper for locating resources.  This allows generic gets.

@kargakis @sttts @fabianofranz I'll let you guys fight over it. :)
2016-09-15 14:39:58 -07:00
Chao Xu d122de5371 add the uid in a delete event to the absentOwnerCache 2016-09-15 13:53:47 -07:00
Paul Morie 703cc16403 Add missing kubelet godoc 2016-09-15 16:27:09 -04:00
Mike Danese a765d59932 move informer and controller to pkg/client/cache
Signed-off-by: Mike Danese <mikedanese@google.com>
2016-09-15 12:50:08 -07:00
Chao Xu 21896dac4b add the uid in a delete event to the absentOwnerCache 2016-09-15 11:22:22 -07:00
Kubernetes Submit Queue 9f0dc7fe27 Merge pull request #32744 from yujuhong/fix_shim
Automatic merge from submit-queue

Clarify the "version" requirement in CRI and fix various bugs in dockershim

This fixes #32741
2016-09-15 08:50:59 -07:00
Pengfei Ni d65309399a Kubelet: add SyncPod for new runtime API 2016-09-15 23:32:36 +08:00
deads2k 771915c6c4 make shortcut expanding restmapper handle all 2016-09-15 11:03:51 -04:00
deads2k 4359c79f53 add FirstHitRESTMapper for adding thirdparty resources 2016-09-15 10:26:39 -04:00
deads2k 500cddc5c3 use discovery restmapper for kubectl 2016-09-15 10:26:39 -04:00
juanvallejo 52fc8efa55 update PrintSuccess message when using --dry-run 2016-09-15 10:11:21 -04:00
Humble Chirammal b4fd7e5591 Change the default volume type of GlusterFS provisioner.
At present, provisioner creates Distribute Volume and this patch
change the default volume type to Distribute-Replica(3) volume.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-09-15 19:00:21 +05:30
guangxuli 05d0c720f1 the lockfile should be handled after function return 2016-09-15 21:02:55 +08:00
Kubernetes Submit Queue 0a62dab566 Merge pull request #32645 from wojtek-t/fix_cacher_logging
Automatic merge from submit-queue

Fix logging in cacher

@smarterclayton @liggitt @hongchaodeng
2016-09-15 05:56:39 -07:00
Kubernetes Submit Queue e3f0ce2347 Merge pull request #32586 from deads2k/api-05-restrict-versions
Automatic merge from submit-queue

restrict discoverable versions to those that have resources

Prevents versions with no resources from appearing in discovery.

@soltysh ptal.  I think you have some issues for this, mind wiring them up?

```
kubectl api-versions
apps/v1alpha1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1beta1
autoscaling/v1
batch/v1
certificates.k8s.io/v1alpha1
extensions/v1beta1
policy/v1alpha1
rbac.authorization.k8s.io/v1alpha1
storage.k8s.io/v1beta1
v1
```
Fixes  #29998.
2016-09-15 05:56:34 -07:00
d00369826 fea0c79054 fix certificates controller hotloop on unexpected API server rejections
Change-Id: Ib7d2e18bcaa498bddfc785f3ff12958dfaaecbc3
2016-09-15 20:10:21 +08:00
Adi Ofry b97b685b96 prevent printing of stack trace when proxying 304 requests in api gateway 2016-09-15 14:52:04 +03:00
Kubernetes Submit Queue 843d7cd24c Merge pull request #32576 from wongma7/revert-30825-pv-controller-informer
Automatic merge from submit-queue

Revert "Use PV shared informer in PV controller"

Fixes #32497 

Reverts kubernetes/kubernetes#30825
2016-09-15 04:37:29 -07:00
Dr. Stefan Schimanski 7f78661d0b Cleanup non-rest apiserver handlers
- rename MuxHelper -> PathRecorderMux
- move non-rest handlers into routes packages within genericapiserver and
  `pkg/routes` (those from master)
- move ui and logs handlers out of genericapiserver (they are
  not generic)
- make version handler configurable (`config.EnableVersion`)
2016-09-15 13:22:45 +02:00
Kubernetes Submit Queue dbdaf2c22b Merge pull request #32597 from liggitt/webhook-re-refactor
Automatic merge from submit-queue

Revert "Revert "Allow webhook authenticator to use TokenReviewsInterface""

Reverts https://github.com/kubernetes/kubernetes/pull/32591 (commit 0a02c8275d)
Readds https://github.com/kubernetes/kubernetes/pull/32547

Holding until GKE webhook authenticator is updated by @cjcullen
2016-09-15 03:56:10 -07:00
Kubernetes Submit Queue 265746af18 Merge pull request #31326 from feiskyer/kuberuntime-gc
Automatic merge from submit-queue

Kubelet: add garbage collection for new runtime API

This PR adds garbage collection for new runtime API.

Note that this PR also adds `CreatedAt` and `PodSandboxId` to `ListContainers()` result.

CC @yujuhong @Random-Liu  @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-15 02:28:05 -07:00
Jan Safranek 9903b389b3 Update cloud providers 2016-09-15 10:33:57 +02:00
Kubernetes Submit Queue edbe71ad58 Merge pull request #32529 from smarterclayton/move_unstructured
Automatic merge from submit-queue

Unstructured methods belong in unstructured.go

Simple code move

@krousey just movement
2016-09-15 01:05:31 -07:00
Jan Safranek a24e6a90bd Add new error 2016-09-15 09:39:30 +02:00
Kubernetes Submit Queue 1ad5c5e4f7 Merge pull request #32593 from johnbieren/master
Automatic merge from submit-queue

Fix audit_test regex for iso8601 timestamps

<!--  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**:  The audit_test unit test fails as some iso8601 timestamps are of the form 2016-09-13T10:32:50.823081217Z and the current regex doesn't allow T's or Z's.

**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**:NONE
<!--  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
```

Signed-off-by: Johnny Bieren <jbieren@redhat.com>
2016-09-14 23:47:23 -07:00
Kubernetes Submit Queue 6946cce099 Merge pull request #32533 from smarterclayton/rest_options_gc
Automatic merge from submit-queue

EnableGarbageCollection should be part of generic.RESTOptions
2016-09-14 23:02:23 -07:00
Kubernetes Submit Queue dab16bf8fd Merge pull request #32565 from jsafrane/deleter-plugin
Automatic merge from submit-queue

Do not report warning event when an unknown deleter is requested

When Kubernetes does not have a plugin to delete a PV it should wait for
either external deleter or storage admin to delete the volume instead of
throwing an error.

This is the same approach as in #32077

@kubernetes/sig-storage
2016-09-14 22:20:36 -07:00
Clayton Coleman 716bac3bbb
All REST that set DeleteCollectionWorkers should set EnableGC 2016-09-15 00:09:34 -04:00
Clayton Coleman acb4c00b39
EnableGarbageCollection should be a struct member on RESTOptions
Not a global. Now that we have RESTOptions this was an easy change.
2016-09-15 00:09:28 -04:00
Kubernetes Submit Queue 96d971fed3 Merge pull request #31704 from timothysc/etcd3_v3client_leak_fix
Automatic merge from submit-queue

Etcd3 v3client + grpc client leak fix

This re-enables the client and plumbs through the destroyFunc to cleanup clients. 

Fix for https://github.com/kubernetes/kubernetes/issues/31262
2016-09-14 20:51:23 -07:00
Kubernetes Submit Queue 98eadd6219 Merge pull request #32636 from justinsb/aws_slower_volume_poll
Automatic merge from submit-queue

AWS: Reduce frequency of volume-mount poll
2016-09-14 19:40:06 -07:00
Yu-Ju Hong 77aa4cd07c CRI: clarify the version string requirement 2016-09-14 18:03:12 -07:00
Saad Ali 1fcaf3aafc Merge pull request #32720 from mikedanese/run-update-all
fully verify client-gen in verification tests
2016-09-14 17:27:36 -07:00
Angus Salkeld a1b2fcb10f Disambiguate unsupported metrics from metrics errors 2016-09-15 10:05:30 +10:00
Yu-Ju Hong 13b23c51cb dockershim: fix docker filter, Hostname, and the apiversion 2016-09-14 16:42:02 -07:00
Mike Danese 2cbbaf4384 autogenerated 2016-09-14 16:33:12 -07:00
Kubernetes Submit Queue fa94308912 Merge pull request #31594 from brendandburns/kubecfg
Automatic merge from submit-queue

To improve error messages, validate the existence of a namespace.

Fixes #15542

@deads2k 
@kubernetes/kubectl
2016-09-14 15:14:06 -07:00
Justin Santa Barbara 3688dc4a72 AWS: More robust volume-mount poll
When we are mounting a lot of volumes, we frequently hit rate limits.

Reduce the frequency with which we poll the status; introduces a bit of
latency but probably matches common attach times pretty closely, and
avoids causing rate limit problems everywhere.

Also, we now poll for longer, as when we timeout, the volume is in an
indeterminate state: it may be about to complete.  The volume controller
can tolerate a slow attach/detach, but it is harder to tolerate the
indeterminism.

Finally, we ignore a sequence of errors in DescribeVolumes (up to 5 in a
row currently).  So we will eventually return an error, but a one
off-failure (e.g. due to rate limits) does not cause us to spuriously
fail.
2016-09-14 16:47:53 -04:00
Kubernetes Submit Queue 9aca785bc8 Merge pull request #32613 from madhusudancs/fed-clientcmd-bug-31947-fix
Automatic merge from submit-queue

Fix clientcmd for a non-host cluster client running in a pod. 

This is based on @errordeveloper's PR #32438. It fixes a case where default config is invalid and original config, i.e. `mergedConfig` is empty. It also adds a test for the case where default config is invalid and original config is neither invalid nor empty.

cc @errordeveloper @kubernetes/sig-cluster-federation @pwittrock @colhom
2016-09-14 13:10:27 -07:00
Vishnu kannan ba6feb2771 fix kubelet ignoring docker daemon in container feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 12:43:59 -07:00
Kubernetes Submit Queue b841a8bad3 Merge pull request #32627 from smarterclayton/relax_content_id
Automatic merge from submit-queue

Docker digest validation is too strict

Docker 1.10 does not guarantee that the pulled digest matches the digest
on disk when dealing with v1 schemas stored in a Docker registry. This
is the case for images like
centos/ruby-23-centos7@sha256:940584acbbfb0347272112d2eb95574625c0c60b4e2fdadb139de5859cf754bf
which as a result of #30366 cannot be pulled by Kube from a Docker 1.10
system.

This partially reverts commit 875fd16e1e.
2016-09-14 12:29:04 -07:00
Vishnu kannan e4acad7afb Fix oom-score-adj policy in kubelet.
Docker daemon and kubelet needs to be protected by setting oom-score-adj to -999.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 11:56:10 -07:00
Kubernetes Submit Queue f59f4aecfa Merge pull request #32660 from mksalawa/fix_usage_printing
Automatic merge from submit-queue

Fix printing container usage in kubectl top

**What this PR does / why we need it**:
Fix a bug in kubectl top, which showed the same value of usage for all containers in a pod.

**Release note**:
```release-note
NONE
```
2016-09-14 11:49:41 -07:00
Maciej Szulik 0163b0a3c6 Remove hacks from ScheduledJobs cron spec parsing
Previusly github.com/robfig/cron library did not allow passing cron spec without
seconds. Previous commit updates the library, which has additional
method ParseStandard which follows the standard cron spec, iow. minute,
hour, day of month, month, day of week.
2016-09-14 20:30:20 +02:00
Clayton Coleman 4a48bf8375
Docker digest validation is too strict
Docker 1.10 does not guarantee that the pulled digest matches the digest
on disk when dealing with v1 schemas stored in a Docker registry. This
is the case for images like
centos/ruby-23-centos7@sha256:940584acbbfb0347272112d2eb95574625c0c60b4e2fdadb139de5859cf754bf
which as a result of #30366 cannot be pulled by Kube from a Docker 1.10
system.

Instead, use RepoDigests field as the primary match, validating the
digest, and then fall back to ID (also validating the match). Adds more
restrictive matching.
2016-09-14 14:13:21 -04:00
Johnny Bieren df6299d110 Fixed edited regex in audit_test unit test
Signed-off-by: Johnny Bieren <jbieren@redhat.com>
2016-09-14 14:08:41 -04:00
Dr. Stefan Schimanski 54f5a9b423 Disable swagger spec caching without /version 2016-09-14 18:44:46 +02:00
Kubernetes Submit Queue fc466743a8 Merge pull request #32592 from dims/update-google-cloud-api-imports
Automatic merge from submit-queue

Update Google Cloud API client import paths
2016-09-14 08:39:49 -07:00
Brendan Burns 23c7c2e3e7 Add namespace error checking if a resource is not found. 2016-09-14 06:51:36 -07:00
Kubernetes Submit Queue e56a32a22d Merge pull request #31772 from gmarek/wrong_flag
Automatic merge from submit-queue

Create a flag for route reconciliation and deprecate unused node-sync-…

cc @pwittrock to decide if it can go in 1.4. It's a zero risk cleanup, that will reduce confusion about cluster configuration.
2016-09-14 06:22:47 -07:00
deads2k 26558da40d restrict discoverable versions to those that have resources 2016-09-14 09:16:11 -04:00
Kubernetes Submit Queue 33e5b0e0db Merge pull request #32504 from kargakis/top-pod-fixes
Automatic merge from submit-queue

kubectl: run validation for 'top pod'

@mksalawa @kubernetes/kubectl
2016-09-14 05:35:42 -07:00
Timothy St. Clair 5b11b5984e Fixes to cleanup storage clients during UT.
During etcd3.clientv3 integration we had discovered we were leaking connections
2016-09-14 07:27:21 -05:00
Timothy St. Clair 9f3841b452 Revert "Revert "Enable v3 Client as the default on UTs""
This reverts commit 9dcef2e3cd.
2016-09-14 07:27:21 -05:00
Kubernetes Submit Queue 6b1565d275 Merge pull request #30678 from ping035627/ping035627-patch-0816
Automatic merge from submit-queue

Recombine the condition for the "shouldScale" function

The PR recombine the condition for the "shouldScale" function, abstract the common condition(hpa.Status.LastScaleTime == nil).
2016-09-14 04:50:49 -07:00
mksalawa 7fe19e0c56 Fix printing container usage. 2016-09-14 12:11:24 +02:00
Kubernetes Submit Queue 5ffb523cf8 Merge pull request #32259 from ZTE-PaaS/zhangke-patch-040
Automatic merge from submit-queue

Improving StopContainer failed log level

Using at least Warning level will be more property
2016-09-14 02:53:55 -07:00
gmarek 4f0129b023 Create a flag for route reconciliatio and deprecate unused node-sync-period one 2016-09-14 11:49:50 +02:00
Dmitry Shulyak 0ddaa20bf1 Fix FakeNodeHandler Update behaviour
Two problems:
1. Get is always using Existing nodes slice, and you will for sure miss any
   updated data
2. Each Update duplicates node entry in UpdatedNodes slice

For the 1st, try to find a node in UpdatedNodes slice (same as for the List).
2nd - append only if there is no node with same name as updated, if there is
just replace object.

Change-Id: I9ef1cca2788ba946eee37fa1b037c124ad76074c
2016-09-14 12:34:37 +03:00
Maciej Szulik 7a34347f7f Move ScheduledJob controller to use generated clientset 2016-09-14 11:27:29 +02:00
Maciej Szulik 5894834cc8 Generated changes for clientset 2016-09-14 11:27:29 +02:00
Wojciech Tyczynski e5b3f19638 Fix logging in cacher 2016-09-14 09:13:41 +02:00
Kubernetes Submit Queue b256b07007 Merge pull request #32407 from deads2k/authz-01-lsar
Automatic merge from submit-queue

add local subject access review API

Adds a local subject access review endpoint to allow a project-admin (someone with full rights within a namespace) the power to inspect whether a person can perform an action in his namespace.  This is a separate resource be factoring like this ensures that it is impossible for him to look outside his namespace and makes it possible to create authorization rules that can restrict this power to a project-admin in his own namespace.  Other factorings require introspection of objects.

@kubernetes/sig-auth
2016-09-13 22:09:35 -07:00
Ke Zhang 423a51b632 Check kubeClient nil in Kubelet and bugfix 2016-09-14 12:57:42 +08:00
Kubernetes Submit Queue e357b9a6f4 Merge pull request #32582 from jlowdermilk/api-all
Automatic merge from submit-queue

make --runtime-config=api/all=true|false work

`Passing --runtime-config=api/all=true|false to apiserver will enable/disable all registered api groups`

Previously, only api/all=false was recognized, and it only disabled groups with resources.
2016-09-13 20:27:34 -07:00
Davanum Srinivas 64efc3a744 Update Google Cloud API client import paths
Bump version of golang.org/x/oauth2
Vendor google.golang.org/cloud/
Vendor google.golang.org/api/
Vendor cloud.google.com/go/compute/
Replace google.golang.org/cloud with cloud.google.com/go/

Fixes #30069
2016-09-13 22:21:06 -04:00
Pengfei Ni f774a68d52 Kubelet: add garbage collection for new runtime API 2016-09-14 09:09:45 +08:00
Kubernetes Submit Queue de9739e3c5 Merge pull request #31576 from feiskyer/kuberuntime-filter
Automatic merge from submit-queue

Kubelet: remove name filter from CRI

Since #30753 and #30463, `name` is not used to identify the container/sandbox, so remove it from CRI.

cc @yujuhong @kubernetes/sig-node @kubernetes/sig-rktnetes
2016-09-13 16:42:13 -07:00
Kubernetes Submit Queue c4893df894 Merge pull request #32151 from bboreham/fix-cni-on-gci
Automatic merge from submit-queue

Add flag to set CNI bin dir, and use it on gci nodes

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

When using `kube-up` on GCE, following #31023 which moved the workers from debian to gci, CNI just isn't working.  The root cause is basically as discussed in #28563: one flag (`--network-plugin-dir`) means two different things, and the `configure-helper` script uses it for the wrong purpose.

This PR adds a new flag `--cni-bin-dir`, then uses it to configure CNI as desired.

As discussed at #28563, I have also added a flag `--cni-conf-dir` so users can be explicit 

**Which issue this PR fixes** : fixes #28563

**Special notes for your reviewer**:

I left the old flag largely alone for backwards-compatibility, with the exception that I stop setting the default when CNI is in use.  The value of `"/usr/libexec/kubernetes/kubelet-plugins/net/exec/"` is unlikely to be what is wanted there.

**Release note**:
```release-note
Added new kubelet flags `--cni-bin-dir` and `--cni-conf-dir` to specify where CNI files are located.
Fixed CNI configuration on GCI platform when using CNI.
```
2016-09-13 16:42:06 -07:00
Madhusudan.C.S c4acaa6717 Add a test to verify that the client config is returned when default config is invalid. 2016-09-13 15:34:56 -07:00
Madhusudan.C.S 0433fe0d72 Do not return original config, i.e. mergeConfig, when it is empty and default config is invalid. 2016-09-13 15:33:51 -07:00
Bryan Boreham 8a69683178 Regenerate codecgen files 2016-09-13 21:42:53 +00:00
Kubernetes Submit Queue 804de8a149 Merge pull request #32244 from tksm/fix-cache-race
Automatic merge from submit-queue

LRUExpireCache#Get requires write lock

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

[LRUExpireCache#Get](dbfad789e3/pkg/util/cache/lruexpirecache.go (L48)) requires write lock since [groupcache/lru#Get](a6b377e340/lru/lru.go (L74)) needs to manipulate its list to track recently used item. Currently it uses read lock so it may introduce race condition.

- [test code which introduces race condition with current LRUExpireCache#Get](https://gist.github.com/tksm/17c7a610ed0574c165e6f6edeca351b7#file-lru_race_test-go)

**Which issue this PR fixes** #31081
2016-09-13 14:36:26 -07:00
Kubernetes Submit Queue f052de66ca Merge pull request #32585 from yujuhong/test_again
Automatic merge from submit-queue

dockershim: add unit tests for sandbox/container status

Also add a fake clock in the FakeDockerClient to allow testing container
CreatedAt, StartedAt, FinishedAt timestamps.
2016-09-13 13:55:07 -07:00
Bryan Boreham db5fa5297d Fix unit tests and known flags list 2016-09-13 20:42:52 +00:00
Jordan Liggitt 52c3081f6f
Revert "Revert "Allow webhook authenticator to use TokenReviewsInterface""
This reverts commit 0a02c8275d.
2016-09-13 16:23:17 -04:00
Johnny Bieren 6194bfb81d Fix audit_test regex for iso8601 timestamps
Signed-off-by: Johnny Bieren <jbieren@redhat.com>
2016-09-13 15:03:49 -04:00
Jeff Lowdermilk e85f8d700c make --runtime-config=api/all=true|false work
Currently, only api/all=false does something (disables
all groups that have resources). Make api/all=false disable all groups
(not just those with resources), and make api/all=true enable
all groups
2016-09-13 12:03:25 -07:00
Joe Finney 0a02c8275d Revert "Allow webhook authenticator to use TokenReviewsInterface"
This reverts commit e9914f2c4a.
2016-09-13 11:48:43 -07:00