Commit Graph

14482 Commits (52b3ef6f9c0326b5df19fa041cea920a59e7c2f3)

Author SHA1 Message Date
Tamer Tas f031f09efc kubelet/api: extract PodSandboxManager interface
Splits `RuntimeService` interface into smaller interfaces
to make testing easier and to delineate responsibilities.
2016-08-16 01:09:28 +03:00
Tamer Tas f715aa475c kubelet/api: extract ContainerManager interface 2016-08-16 01:08:17 +03:00
Minhan Xia 85fdeb4742 add iptables util parameters to kubelet config type 2016-08-15 15:04:11 -07:00
bindata-mockuser e067f7548f Delete all dead containers only after pod syncing is done. 2016-08-15 14:36:51 -07:00
Tamer Tas cfc08dea34 kubelet/api: extract RuntimeVersioner interface 2016-08-16 00:35:07 +03:00
Kubernetes Submit Queue 967dc4234a Merge pull request #30582 from dims/fix-issue-30580
Automatic merge from submit-queue

Fix image verification when hostname is present in image

Deal better with the situation where a image name contains
a hostname as well.

Fixes #30580
2016-08-15 14:26:05 -07:00
Hongchao Deng ed79925dd6 pkg/storage: remove unused Config 2016-08-15 14:20:38 -07:00
Kris 69e0740b93 Properly decode lists into VersionedObjects 2016-08-15 14:18:40 -07:00
Kris e5c2154883 Eliminate redundant dynamic client type
This will allow people to override the default parameter codec and still
pass the resulting client with something that accepts *dynamic.Client.
2016-08-15 14:18:40 -07:00
Kris d9ce524d63 Expose dynamic client's content config 2016-08-15 14:18:40 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Tim St. Clair db6629228f
Add AppArmor E2E test 2016-08-15 13:25:22 -07:00
Tim St. Clair 3c7896719b
Implement AppArmor Kubelet support 2016-08-15 13:25:17 -07:00
Kubernetes Submit Queue 69419a145a Merge pull request #29802 from jfrazelle/fix-go-vet-errors
Automatic merge from submit-queue

fix go vet errors

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

```release-note
```

This fixes the `go vet` errors brought about by go 1.7 testing re (#28742).

The are all pretty trivial and mostly related to literal composites.

also related to #16086
2016-08-15 13:10:08 -07:00
Kubernetes Submit Queue 88d8628137 Merge pull request #30521 from yujuhong/rm_pod_resources
Automatic merge from submit-queue

CRI: remove pod sandbox resources

The pod-level resources need further discussion. Remove it from CRI for now.

See the original discussion in #29871
2016-08-15 11:42:19 -07:00
Hongchao Deng eb516fbc0a optimize field.Set{} -> nil 2016-08-15 11:41:25 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Mike Danese ab730a7179 add a certificate signing request resource printer in kubectl 2016-08-15 09:57:17 -07:00
Kubernetes Submit Queue 3a71e8c9f4 Merge pull request #30457 from ericchiang/reorder-autenticators
Automatic merge from submit-queue

pkg/apiserver/authenticator: reorder oidc plugin to auth after service accounts

Both plugins verify JWTs, but the OpenID Connect plugin performs
much worse when faced with cache misses. Reorder the plugins so
the service account plugin tries to authenticate a bearer token
first.

I had a fun time with this by writing an OpenID Connect provider that stores its data in third party resources. When it's running in the cluster it uses a service account and caused some interesting behavior when the keys expired.

Our OpenID Connect plugin needs a more sophisticated caching model to avoid continuously re-requesting keys when seeing a lot of tokens it doesn't recognize. However, I feel this reordering is generally useful since service accounts will be more common than OpenID Connect tokens.

cc @kubernetes/sig-auth
2016-08-15 09:39:02 -07:00
Clayton Coleman 6caf4d5a3f
Describing a single item should not have extra newlines 2016-08-15 12:28:15 -04:00
derekwaynecarr cebb038935 Fix pvc requests.storage validation 2016-08-15 09:56:04 -04:00
Dominika Hodovska 08945a9b6a Add note: kubelet manages only k8s containers.
bug 1328441
Bugzilla link https://bugzilla.redhat.com/show_bug.cgi?id=1328441
2016-08-15 12:36:29 +02:00
Kubernetes Submit Queue 85c91eb332 Merge pull request #30451 from soltysh/isssue30442
Automatic merge from submit-queue

Remove pods along with jobs when Replace ConcurrentPolicy is set

Fixes #30442

This builds on #30327 and needs a bit more love in tests.

@janetkuo @erictune fyi
2016-08-14 04:25:39 -07:00
Maciej Szulik d446930699 Remove pods along with jobs when Replace ConcurrentPolicy is set 2016-08-14 11:59:06 +02:00
AdoHe 2d06408300 use Reader.ReadLine instead of bufio.Scanner to support bigger yaml 2016-08-14 16:02:43 +08:00
Hongchao Deng 75fe25e717 generic.Matcher -> *generic.SelectionPredicate 2016-08-13 21:52:11 -07:00
Davanum Srinivas cc9f41c6d3 Fix image verification when hostname is present in image
Deal better with the situation where a image name contains
a hostname as well.

Fixes #30580
2016-08-13 23:10:07 -04:00
AdoHe b2ab4c6d9b fix node controller event uid issue 2016-08-14 09:41:20 +08:00
Kubernetes Submit Queue 3a8b21b3a5 Merge pull request #29724 from brendandburns/thirdparty3
Automatic merge from submit-queue

Fix third party APIResource reporting

@polvi @caesarxuchao @deads2k 

This "fixes" some additional bugs in third party `APIResourceList` reporting.

This code needs a bunch of cleanup, and more tests, but sending it out for a quick smell check review in case I'm doing something stupid.

Fixes the bug referenced here:  https://github.com/kubernetes/kubernetes/pull/28414#issuecomment-235346108 and in https://github.com/kubernetes/kubernetes/issues/23831

Fixes https://github.com/kubernetes/kubernetes/issues/25570
2016-08-13 17:10:20 -07:00
Brendan Burns b3658c7b16 Fix third party APIResource reporting 2016-08-13 15:51:34 -07:00
Kubernetes Submit Queue ceb75699dd Merge pull request #29740 from svanharmelen/f-cloudstack-cloudprovider
Automatic merge from submit-queue

Add CloudStack cloud provider (extended and refactored)

This PR is superseding PR #26165 is which some groundwork for this PR has been done. So this PR now fixes #26165 and fixes #26045.

I've been in contact with @ngtuna about this updated version of his earlier work (which is still in this PR as one squashed commit) and he has given his 👍  for this 😉

This PR adds additional logic for allocating and associating a public IP, if the `—load-balancer-ip` option is not used. It will do proper management of public IP’s that are allocated by this provider ( so IP’s that are no longer needed/used will also be released again).

Additionally the provider can now also work with CloudStack projects and advanced (VPC) networks. And lastly the Zone interface now returns an actual zone (supplied by the cloud config), a few logical errors are fixed and the first few tests are added.

All the functionality is extensively tested against both basic and advanced (VPC) networks and of course all new and existing (integration) tests are all passing.
2016-08-13 11:30:07 -07:00
Hongchao Deng d4afb781c3 change all PredicateFunc to use SelectionPredicate 2016-08-13 10:11:35 -07:00
Kubernetes Submit Queue e39d7f71e6 Merge pull request #30251 from hongchaodeng/r2
Automatic merge from submit-queue

Move new etcd storage (low level storage) into cacher

In an effort for #29888, we are pushing forward this:

What?
- It changes creating etcd storage.Interface impl into creating config
- In creating cacher storage (StorageWithCacher), it passes config created above and new etcd storage inside.

Why?
- We want to expose the information of (etcd) kv client to cacher. Cacher storage uses this information to talk to remote storage.
2016-08-13 10:09:49 -07:00
Kubernetes Submit Queue 7d00b427ef Merge pull request #30557 from freehan/cniconfig
Automatic merge from submit-queue

move syncNetworkConfig to Init for cni network plugin

start syncNetworkConfig routine in `Init` instead of probing. This fixes a bug where the syncNetworkConfig runs periodically even `cni` network plugin is not in use.
2016-08-13 05:58:33 -07:00
Kubernetes Submit Queue 25f29cb71b Merge pull request #30528 from hongchaodeng/fix
Automatic merge from submit-queue

add RequiresExactMatch test for empty andterm

What?
Add a test path for empty andterm.

Why?
fields.Everything() returns empty andterm.
fields.SelectorFromSet() returns empty andterm.
2016-08-13 04:11:39 -07:00
Kubernetes Submit Queue 9d3bd4caf6 Merge pull request #30517 from kubernetes/cri/remove-resources
Automatic merge from submit-queue

Remove resource specifications from CRI until further notice

See #29871 for the discussion issue.

cc @dchen1107 @vishh @yujuhong @euank @yifan-gu @feiskyer
2016-08-13 03:35:47 -07:00
Kubernetes Submit Queue f98de24061 Merge pull request #30510 from derekwaynecarr/logging-fix
Automatic merge from submit-queue

Endpoint controller logs errors during normal cluster behavior

The endpoint controller logs an error when its forbidden from creating new endpoints during namespace termination.  This is normal cluster behavior, and therefore should not be logged.  This confuses operators administrating the cluster.

Updated to log at a lower level in response to a forbidden message when performing a create operation.  In case of an error on the API server side of the house, I continue to requeue the key.  It should be ignored in a future syncService call once the service is deleted as part of namespace termination.

See https://bugzilla.redhat.com/show_bug.cgi?id=1347425

/cc @kubernetes/rh-cluster-infra
2016-08-13 02:59:26 -07:00
Sander van Harmelen 7c3e644162 Enable managing public IP’s and work with projects
This commit adds logic for allocating and associating a public IP, if the `—load-balancer-ip` option is not used. It will do proper management of IP’s that are allocated by this provider, so IP’s that are no longer needed/used will also be released again.

Additionally the provider can now also work with CloudStack projects and advanced (VPC) networks.

Lastly the Zone interface now returns an actual zone (supplied by the cloud config), a few logical errors are fixed and the first few tests are added.

All the functionality is extensively tested against both basic and advanced (VPC) networks.
2016-08-13 10:23:17 +02:00
Kubernetes Submit Queue a44baa0a48 Merge pull request #30383 from deads2k/fix-reaper
Automatic merge from submit-queue

speed up RC scaler

The RC scaler was waiting before starting the scale and then didn't use a watch to observe the result.  That led to longer than expected wait times.

@fabianofranz ptal.  You may want to sweep the rest of the file.  It could use some tidying with `RetryOnConflict` and `watch.Until`.
2016-08-13 01:05:00 -07:00
ngtuna 52cb7b0755 Initial CloudStack provider 2016-08-13 09:40:23 +02:00
Kubernetes Submit Queue 8a35d4c97c Merge pull request #30366 from dims/fix-issue-30355
Automatic merge from submit-queue

Validate SHA/Tag when checking docker images

Docker API does not validate the tag/sha, for example, all the following
calls work say for a alpine image with short SHA "4e38e38c8ce0"
echo -e "GET /images/alpine:4e38e38c8ce0/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock
echo -e "GET /images/alpine:4e38e38c/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock
echo -e "GET /images/alpine:4/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock

So we should check the response from the Docker API and look for the tags or SHA explicitly.

Fixes #30355
2016-08-12 23:42:40 -07:00
Kubernetes Submit Queue df1abb40ec Merge pull request #30246 from liggitt/certificates
Automatic merge from submit-queue

Set user info in CertificateSigningRequest.Spec on create

Fixes #30239
2016-08-12 23:03:18 -07:00
Kubernetes Submit Queue dadb3322dc Merge pull request #30327 from janetkuo/sj-controller-client
Automatic merge from submit-queue

Use unversioned client in scheduledjobs and set group version to batch/v2alpha1

Fixes #30323
2016-08-12 22:08:34 -07:00
Kubernetes Submit Queue f0e5dac1f1 Merge pull request #30247 from ardnaxelarak/28695_suppress_noisy_output
Automatic merge from submit-queue

Make more messages respect --quiet flag

Make following two messages respect `--quiet` in `kubectl run`
- `If you don't see a command prompt, try pressing enter.`
- `Pod "name" deleted`

Ref #28695
2016-08-12 21:34:14 -07:00
Kubernetes Submit Queue 612e3c2634 Merge pull request #30222 from hodovska/port-forward-cmd-struct
Automatic merge from submit-queue

kubectl/port-forward: complete/validate/run structure

```kubectl port-forward``` command is converted to a complete/validate/run kubectl command structure specified here: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md#command-conventions
In this PR is also exposed the ready and stop channel for API consumer.

Fixes #16504
2016-08-12 20:58:53 -07:00
Kubernetes Submit Queue 929b238adc Merge pull request #30137 from nhlfr/cni-plugin-fail
Automatic merge from submit-queue

Set pod state as "unknown" when CNI plugin fails

Before this change, CNI plugin failure didn't change anything in the pod status, so pods having containers without requested network were "running".

Fixes #29148
2016-08-12 19:28:14 -07:00
Hongchao Deng d0938094d9 move new etcd storage into cacher 2016-08-12 18:40:20 -07:00
Kubernetes Submit Queue 96655d7578 Merge pull request #30087 from dims/remove-pkill-dependency
Automatic merge from submit-queue

Remove kubelet pkill dependency

Issue #26093 identified pkill as one of the dependencies of kublet
which could be worked around.  Build on the code introduced for pidof
and regexp for the process(es) we need to send a signal to.

Related to #26093
2016-08-12 18:38:38 -07:00
Kubernetes Submit Queue 29eda9bf29 Merge pull request #30421 from nikhiljindal/eventsAPI
Automatic merge from submit-queue

Adding events to federation control plane

Adding events to federation control plane.

Apart from the standard changes to add a resource to `federation/apis/core/v1`, other changes are:
* Adding a new `federationoptions.ServerRunOptions` which includes `genericoptions.ServerRunOptions` and EventsTTL. 
* Added a new method in `pkg/api/mapper` to build a RestMapper based on the passed Scheme rather than using `api.Scheme`. Updated `federation/apis/core/install` to use this new method. Without this change, if `federation/apis/core/install.init()` is called before `pkg/api/install.init()` then the registered RESTMapper in `pkg/apimachinery/registered` will have no resources. This second problem will be fixed once we have instances of `pkg/apimachinery/registered` instead of a single global singleton (generated clientset which imports `pkg/api/install` will have a different instance of registered, than federation-apiserver which imports `federation/apis/core/install`).

cc @kubernetes/sig-cluster-federation @lavalamp
2016-08-12 17:26:54 -07:00
Yu-Ju Hong bf7020a9b7 CRI: remove pod resources
The pod-level resources need further discussion. Remove it from CRI for now.
2016-08-12 17:07:25 -07:00
Minhan Xia 7964148059 move syncNetworkConfig to Init for cni network plugin 2016-08-12 16:49:25 -07:00
Janet Kuo e4269d490f Use unversioned client in scheduledjobs and set group version to batch/v2alpha1 2016-08-12 16:46:09 -07:00
Girish Kalele f64c052858 Revert "Scheduledjob e2e" 2016-08-12 16:12:19 -07:00
Kubernetes Submit Queue f279e61e4a Merge pull request #27874 from ingvagabund/kubelet-kernel-tunning-behaviour-new-flags
Automatic merge from submit-queue

[kubelet] Introduce --protect-kernel-defaults flag to make the tunable behaviour configurable

Let's make the default behaviour of kernel tuning configurable. The default behaviour is kept modify as has been so far.
2016-08-12 14:11:26 -07:00
Kubernetes Submit Queue ac1f8bc665 Merge pull request #26027 from soltysh/scheduledjob_e2e
Automatic merge from submit-queue

Scheduledjob e2e

@erictune last element of the scheduledjob puzzle. I think we'll iterate on this once we have all the puzzles in place. This is one of those things that will be allowed to merge after code freeze.

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-12 13:27:32 -07:00
Tamer Tas 2b055eb475 pkg/kubelet/container: deprecate outdated CRI API 2016-08-12 23:06:36 +03:00
Tamer Tas 70b5ed2665 pkg/kubelet/rktshim: deprecate kubelet/container API usage 2016-08-12 23:06:32 +03:00
Kubernetes Submit Queue 72f41ff8cf Merge pull request #30506 from tmrts/docs/cri-correction
Automatic merge from submit-queue

pkg/kubelet/container: amend cgroup type documentation
2016-08-12 12:08:17 -07:00
Kubernetes Submit Queue 5992deda1d Merge pull request #30478 from dims/fix-test-pidof-take-2
Automatic merge from submit-queue

Fix TestPidOf {procfs} - Take #2

We should not bailout when we get an error. We should continue
processing other files/directories. We were returning the
err passed in which was causing the processing to stop.

Fixes #30377
2016-08-12 12:07:40 -07:00
Kubernetes Submit Queue 19b2dd17b1 Merge pull request #30083 from feiskyer/kuberuntime-config
Automatic merge from submit-queue

Kubelet: generate sandbox/container config for new runtime API

Generate sandbox/container config for new runtime API. Part of #28789 .

CC @yujuhong @Random-Liu @dchen1107
2016-08-12 12:07:05 -07:00
Hongchao Deng 068bd170fc add RequiresExactMatch test for empty andterm 2016-08-12 11:51:52 -07:00
nikhiljindal 1d76884336 Adding events to federation apiserver 2016-08-12 10:48:19 -07:00
Kubernetes Submit Queue a4acf08747 Merge pull request #30460 from juanvallejo/jvallejo_kube-add-zsh-compatibility-note-kubectl-completion
Automatic merge from submit-queue

Add zsh compatibility note `completion` cmd help

zsh completions are not supported on zsh versions < 5.2.

This patch advices user on supported versions of zsh when using the `completion`
command to avoid potential UX failure.

##### After
`$ kubectl completion -h`
```
Output shell completion code for the given shell (bash or zsh).

This command prints shell code which must be evaluation to provide interactive
completion of kubectl commands.

Examples:

$ source <(kubectl completion bash)

will load the kubectl completion code for bash. Note that this depends on the
bash-completion framework. It must be sourced before sourcing the kubectl
completion, e.g. on the Mac:

$ brew install bash-completion
$ source $(brew --prefix)/etc/bash_completion
$ source <(kubectl completion bash)

If you use zsh*, the following will load kubectl zsh completion:

$ source <(kubectl completion zsh)

* zsh completions are only supported in versions of zsh >= 5.2
```

```release-note
release-note-none
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30460)
<!-- Reviewable:end -->
2016-08-12 10:16:50 -07:00
derekwaynecarr 038c754b7f Endpoint controller logs errors during normal cluster behavior 2016-08-12 12:51:07 -04:00
Kubernetes Submit Queue 7df59f75cd Merge pull request #29726 from anguslees/lb-autodetect
Automatic merge from submit-queue

openstack: Autodetect LBaaS v1 vs v2

```release-note
* openstack: autodetect LBaaS v1/v2 by querying for available extensions.  For most installs, this effectively changes the default from v1 to v2.  Existing installs can add "lb-version = v1" to the provider config file to continue to use v1.
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29726)
<!-- Reviewable:end -->
2016-08-12 09:02:42 -07:00
Kubernetes Submit Queue 6f20321833 Merge pull request #28509 from juanvallejo/jvallejo_update-human-readable-printer-signature
Automatic merge from submit-queue

Update HumanResourcePrinter signature w single PrintOptions param

release-note-none

- Makes [HumanReadablePrinter options field non-exported again](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/resource_printer.go#L346-349)
- Adds test-case for HumanReadablePrinter resource printing with aliases.
- Better formatting for saving resource "kind" aliases

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28509)
<!-- Reviewable:end -->
2016-08-12 07:27:56 -07:00
Tamer Tas 14cc9919d0 pkg/kubelet/container: amend cgroup type documentation 2016-08-12 16:52:48 +03:00
Kubernetes Submit Queue 9c3d539313 Merge pull request #28844 from mksalawa/kubectltop
Automatic merge from submit-queue

Implement 'kubectl top' command

```release-note
Added 'kubectl top' command showing the resource usage metrics.
```

Sample output:

Nodes:
```
$ kubectl top node

NAME                           CPU       MEMORY    STORAGE   TIMESTAMP                         
kubernetes-minion-group-xxxx   76m       1468 Mi   0 Mi      Tue, 12 Jul 2016 17:37:00 +0200   
kubernetes-minion-group-yyyy   73m       1511 Mi   0 Mi      Tue, 12 Jul 2016 17:37:00 +0200   
kubernetes-minion-group-zzzz   46m       1506 Mi   0 Mi      Tue, 12 Jul 2016 17:37:00 +0200   
kubernetes-master              76m       2059 Mi   0 Mi      Tue, 12 Jul 2016 17:37:00 +0200   
```

Pods in all namespaces:
```
$ kubectl top pod --all-namespaces

NAMESPACE     NAME                                                 CPU       MEMORY    STORAGE   TIMESTAMP                         
default       nginx-1111111111-zzzzz                               0m        1 Mi      0 Mi      Tue, 12 Jul 2016 17:49:00 +0200   
kube-system   etcd-server-kubernetes-master                        4m        116 Mi    0 Mi      Tue, 12 Jul 2016 17:49:00 +0200   
kube-system   fluentd-cloud-logging-kubernetes-minion-group-xxxx   14m       110 Mi    0 Mi      Tue, 12 Jul 2016 17:49:00 +0200   
kube-system   kube-dns-v18-zzzzz                                   1m        6 Mi      0 Mi      Tue, 12 Jul 2016 17:49:00 +0200   
...
```

Pod with containers:
```
$ kubectl top pod heapster-v1.1.0-1111111111-miail --namespace=kube-system --containers

NAMESPACE     NAME                               CPU       MEMORY    STORAGE   TIMESTAMP                         
kube-system   heapster-v1.1.0-1111111111-miail   1m        42 Mi     0 Mi      Tue, 12 Jul 2016 17:52:00 +0200   
              heapster                           1m        26 Mi     0 Mi                                        
              eventer                            0m        3 Mi      0 Mi                                        
              heapster-nanny                     0m        6 Mi      0 Mi                                        
              eventer-nanny                      0m        6 Mi      0 Mi                                        
```

ref #11382

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28844)
<!-- Reviewable:end -->
2016-08-12 06:50:43 -07:00
Dominika Hodovska c5babe2396 expose ready/stop channel 2016-08-12 15:45:57 +02:00
Piotr Szczesniak a53cfd28fb Autogenerated changes 2016-08-12 15:13:44 +02:00
Kubernetes Submit Queue 2ab58ea519 Merge pull request #30162 from juanvallejo/jvallejo_err-kube-run-on-invalid-image-value
Automatic merge from submit-queue

return err on `kubectl run --image` with invalid value

When running `kubectl run <configname> --image="Invalid$$%ImageValue%%__"`, a configuration is successfully created with an image name that is not a valid value for an image reference.

This patch validates that the image name is a valid image reference, and returns an error before creating a config if an invalid value is passed.

`$ kubectl run test --image="Invalid__%imagename"`
```
error: Invalid image name "Invalid__%imagename": invalid reference format
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30162)
<!-- Reviewable:end -->
2016-08-12 06:09:26 -07:00
Piotr Szczesniak dd142d3e95 Do not generate client for HPA in extensions 2016-08-12 15:01:25 +02:00
Kubernetes Submit Queue 510924b70a Merge pull request #27087 from soltysh/audit_log
Automatic merge from submit-queue

Basic audit log

Fixes #2203 by introducing simple audit logging, including the information about impersonation. We currently have something identical in openshift, but I'm open to any suggestions. Sample logs look like that:

as `<self>`:
```
AUDIT: id="75114bb5-970a-47d5-a5f1-1e99cea0574c" ip="127.0.0.1" method="GET" user="test-admin" as="<self>" namespace="openshift" uri="/api/v1/namespaces/openshift/pods/python"
AUDIT: id="75114bb5-970a-47d5-a5f1-1e99cea0574c" response=200
```

as user:
```
AUDIT: id="b0a443ae-f7d8-408c-a355-eb9501fd5c59" ip="192.168.121.118" method="GET" user="system:admin" as="test-admin" namespace="openshift" uri="/api/v1/namespaces/openshift/pods/python"
AUDIT: id="b0a443ae-f7d8-408c-a355-eb9501fd5c59" response=200
```

```release-note
* Add basic audit logging
```

@ericchiang @smarterclayton @roberthbailey @erictune @ghodss 

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/27087)
<!-- Reviewable:end -->
2016-08-12 05:31:31 -07:00
deads2k 553313f867 speed up RC scaler 2016-08-12 08:19:10 -04:00
Maciej Szulik 24f1e1eaf6 Basic audit log 2016-08-12 12:27:19 +02:00
Kubernetes Submit Queue d2543c30d8 Merge pull request #30277 from wojtek-t/optimize_controllers
Automatic merge from submit-queue

Avoid computing DeepEqual in controllers all the time

Computing DeepCopy was responsible for ~33% of cpu usage of controller-manager before this PR.

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

```release-note
* Use the release-note-* labels to set the release note state 
* Clear this block to use the PR title as the release note 
-OR-
* Enter your extended release note here (newlines are formatted as bullets)
```

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30277)
<!-- Reviewable:end -->
2016-08-12 03:20:58 -07:00
Kubernetes Submit Queue 5c1e1573d2 Merge pull request #30461 from caesarxuchao/kubectl-gc
Automatic merge from submit-queue

Let kubectl delete rc and rs with DeleteOptions.OrphanDependents=false

so that when the garbage collector is enabled, RC and RS are deleted immediately without waiting for the garbage collector to orphan the pods.

There is no user visible changes, so we don't need a release note.

cc @fabioy

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30461)
<!-- Reviewable:end -->
2016-08-12 01:55:11 -07:00
Kubernetes Submit Queue c4c930b413 Merge pull request #30005 from dchen1107/api
Automatic merge from submit-queue

Marked NodePhase deprecated.

cc/ @lavalamp 

Even Kubernetes stops set NodePhase for a while, the user might patch NodeStatus with NodePhase. Marked the field deprecated and documented first. 

xref: https://github.com/kubernetes/kubernetes.github.io/pull/549

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30005)
<!-- Reviewable:end -->
2016-08-12 01:11:12 -07:00
Kubernetes Submit Queue 8bd71c3de9 Merge pull request #29502 from lixiaobing10051267/masterHostName
Automatic merge from submit-queue

t.Errorf output wrong variables in identity_mapper_test.go

t.Errorf output wrong variables in identity_mapper_test.go

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29502)
<!-- Reviewable:end -->
2016-08-12 00:31:53 -07:00
Kubernetes Submit Queue 4a5c852697 Merge pull request #30420 from janetkuo/sj-job-determi
Automatic merge from submit-queue

Name jobs created by sj deterministically

```release-note
Name the job created by scheduledjob (sj) deterministically with sj's name and a hash of job's scheduled time.
```

@erictune @soltysh

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30420)
<!-- Reviewable:end -->
2016-08-11 23:14:02 -07:00
Kubernetes Submit Queue c73b96d66d Merge pull request #25526 from lavalamp/fix-generated-code
Automatic merge from submit-queue

Fix code generators-- make scheme building composable

I needed to make some changes to make my other refactoring possible and this got rather large. 

We now provide a "SchemeBuilder" to help all of the api packages provide their scheme-building functions (addKnownTypes and friends) in a standardized way. This also allows generated deepcopies & conversions to be entirely self contained, the project will now build without them being present (as they can add themselves to the SchemeBuilder). (Although if you actually build without them, you will get reduced performance!)

Previously, there was no way to construct your own runtime.Scheme (e.g., to test), you had to use the api.Scheme object, which has all sorts of non-hermetic cruft in it. Now you can get everything from a package by calling the scheme builder's AddToScheme, including the generated functions, if they are present.

Next steps are to allow for declaring dependencies, and to standardize the registration & install code. (#25434)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/25526)
<!-- Reviewable:end -->
2016-08-11 22:38:29 -07:00
Kubernetes Submit Queue 01aff52e0c Merge pull request #29653 from ZTE-PaaS/zhangke-patch-010
Automatic merge from submit-queue

the observed usage should match those that have hard constraints

in the sync process, the quota will be replenished, the new observed usage will be sumed from each evaluator, if the previousUsed set is not be cleared, the new usage will be dirty, maybe some unusage resource still in ,  as the code below
	newUsage = quota.Mask(newUsage, matchedResources)
	for key, value := range newUsage {
		usage.Status.Used[key] = value
	}
so i think here shoul not set value previousUsed

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29653)
<!-- Reviewable:end -->
2016-08-11 21:54:28 -07:00
Pengfei Ni 3512975c31 Kubelet: generate sandbox/container config for new runtime API 2016-08-12 12:20:56 +08:00
Kubernetes Submit Queue 78356b53b0 Merge pull request #30396 from derekwaynecarr/quota-negative-usage
Automatic merge from submit-queue

Quota admission errors if usage is negative

If quota observes negative usage for an artifact, that artifact could game the quota system.

This adds a global check in the quota system to catch this scenario for all evaluators.

/cc @deads2k

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30396)
<!-- Reviewable:end -->
2016-08-11 20:24:43 -07:00
lixiaobing10051267 65f772d050 Modify IsInvalidObj name and description 2016-08-12 11:17:08 +08:00
Kubernetes Submit Queue 922477f987 Merge pull request #30381 from aveshagarwal/kubectl-describe-pod-display-tolerations
Automatic merge from submit-queue

Display pod tolerations with kubectl describe pod

@kubernetes/rh-cluster-infra @kubernetes/kubectl

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30381)
<!-- Reviewable:end -->
2016-08-11 19:45:15 -07:00
Kubernetes Submit Queue 7c7acbe1bb Merge pull request #30417 from yujuhong/source_ready
Automatic merge from submit-queue

kubelet: mark source ready after updating the cache

This ensures that cleanup routines don't start until the cache content is
up-to-date.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30417)
<!-- Reviewable:end -->
2016-08-11 18:28:44 -07:00
Angus Lees e4c354c329 openstack: Autodetect LBaaS v1 vs v2
This removes the need to manually specify the version in all but unusual
cases.

For most installs this will effectively flip the default from
v1 (deprecated) to v2 so conservative existing installs may want to
manually configure "lb-version = v1" before upgrading.
2016-08-12 10:33:11 +10:00
Daniel Smith 77f5813194 update generated files, including the client 2016-08-11 17:06:55 -07:00
Daniel Smith f1fd638962 fix register.go files up + add test import 2016-08-11 17:06:54 -07:00
Kubernetes Submit Queue 2c28b88efb Merge pull request #29812 from timstclair/aa-validation
Automatic merge from submit-queue

Add AppArmor validation logic

The validation checks the prerequisites described in the [AppArmor proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/apparmor.md#prerequisites).

In order to unblock the AppArmor implementation from waiting on the APIs to merge, this PR uses 2 helper stubs for handling the Pod API.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29812)
<!-- Reviewable:end -->
2016-08-11 15:49:55 -07:00
Kubernetes Submit Queue d4691a76ec Merge pull request #27911 from jfrazelle/start-enable-golint
Automatic merge from submit-queue

Start verifying golint on a per-package basis as packages are fixed

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

```release-note
Added `golint` for pkg/security/podsecuritypolicy/capabilities` along with validation.
```


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

This is a POC to start enabling `golint` checks on a per-package basis, we did this on the docker project and it was a great way for new contributors to help and it benefits the project overall. All they have to do is add the package they fixed to the bash array in `hack/verify-golint.sh` and fix all the lint errors. 
Eventually when all the packages have been fixed we can change the function to `find_files`. Or something based off which files are changed in a patch set to verify `golint`.
Now I used this specific package as the POC because I wanted to show the downside of this changing the api of the package.
Most of the times this arose in docker/docker we decided that if someone wasn't importing their deps locally then it was their loss, but I'm not sure if you all will agree.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/27911)
<!-- Reviewable:end -->
2016-08-11 15:03:06 -07:00
Davanum Srinivas 24e8e12b04 Fix TestPidOf {procfs} - Take #2
We should not bailout when we get an error. We should continue
processing other files/directories. We were returning the
err passed in which was causing the processing to stop.

Fixes #30377
2016-08-11 17:36:04 -04:00
bindata-mockuser d2dd03aecc Support percentage representation for eviction thresholds 2016-08-11 14:10:25 -07:00
Kubernetes Submit Queue 9620f066c6 Merge pull request #30128 from ZTE-PaaS/zhangke-patch-021
Automatic merge from submit-queue

get workers length shoud use RLock

get workers length shoud use RLock properly

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30128)
<!-- Reviewable:end -->
2016-08-11 13:33:10 -07:00
Daniel Smith caed8d85f4 add scheme builder 2016-08-11 13:18:26 -07:00
Kubernetes Submit Queue 91a3930331 Merge pull request #30362 from lixiaobing10051267/masterAppsClient
Automatic merge from submit-queue

check validation with no apps client in kubectl util factory

autoscaling client already exist:

		if c.c.AutoscalingClient == nil {
			return errors.New("unable to validate: no autoscaling client")

so following autoscaling client should be apps client:

		if c.c.AppsClient == nil {
			return errors.New("unable to validate: no autoscaling client")
		}

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30362)
<!-- Reviewable:end -->
2016-08-11 12:54:14 -07:00
Chao Xu bcc1b68d47 let kubectl delete rc and rs using explicit non-orphan delete options 2016-08-11 11:30:26 -07:00
juanvallejo 9eb98cfb58 Add zsh compatibility note `completion` cmd help 2016-08-11 13:49:44 -04:00
Tim St. Clair bdc306bbfe
Add AppArmor validation logic
The validation checks the prerequisites described in the [AppArmor
proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/apparmor.md#prerequisites)
2016-08-11 10:31:25 -07:00
Janet Kuo 566667888d Name jobs created by sj deterministically 2016-08-11 10:27:56 -07:00
Avesh Agarwal 230251b030 Display pod tolerations with kubectl describe pod. 2016-08-11 12:52:50 -04:00
Eric Chiang 9b5ce5218f pkg/apiserver/authenticator: move oidc after service accounts
Both plugins verify JWTs, but the OpenID Connect plugin performs
much worse when faced with cache misses. Reorder the plugins so
the service account plugin tries to authenticate a bearer token
first.
2016-08-11 09:41:50 -07:00
derekwaynecarr 5cca4b07c6 Quota admission errors if usage is negative 2016-08-11 11:26:59 -04:00
mksalawa 5df9fe684d Implement kubectl top command with subcommands. 2016-08-11 17:25:18 +02:00
Kubernetes Submit Queue 2fb7cae2be Merge pull request #29999 from mtaufen/kubecfg-config-field-rename
Automatic merge from submit-queue

[Kubelet] Rename `--config` to `--pod-manifest-path`. `--config` is deprecated.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose. I didn't change the flag name because that
API should remain stable.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29999)
<!-- Reviewable:end -->
2016-08-11 08:11:52 -07:00
Ke Zhang d9c9cafbf3 the observed used should match those that have hard constraint 2016-08-11 22:35:38 +08:00
Kubernetes Submit Queue 342aac2ffd Merge pull request #30402 from dims/fix-issue-30377
Automatic merge from submit-queue

Fix intermittent failures in TestPidOf {procfs}

Bailout if WalkFunc is called with an error.

Fixes #30377

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30402)
<!-- Reviewable:end -->
2016-08-11 06:47:45 -07:00
Davanum Srinivas 875fd16e1e Validate SHA/Tag when checking docker images
Docker API does not validate the tag/sha, for example, all the following
calls work say for a alpine image with short SHA "4e38e38c8ce0"
echo -e "GET /images/alpine:4e38e38c8ce0/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock
echo -e "GET /images/alpine:4e38e38c/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock
echo -e "GET /images/alpine:4/json HTTP/1.0\r\n" | nc -U /var/run/docker.sock

So we should check the response from the Docker API and look for the
tags or SHA explicitly.

Fixes #30355
2016-08-11 08:53:05 -04:00
Jan Chaloupka 587b1f845a Autogenerate 2016-08-11 13:49:19 +02:00
Jan Chaloupka eb967ad143 kubelet: introduce --protect-kernel-defaults to make the KernelTunableBehavior configurable 2016-08-11 13:08:27 +02:00
Janet Kuo fe53ec34cf Use unversioned client in scheduledjobs and set group version to batch/v2alpha1 2016-08-11 13:06:18 +02:00
Kubernetes Submit Queue 035ec518af Merge pull request #28387 from caesarxuchao/gc-latency-measure
Automatic merge from submit-queue

[GarbageCollector] measure latency

First commit is #27600.

In e2e tests, I measure the average time an item spend in the eventQueue(~1.5 ms), dirtyQueue(~13ms), and orphanQueue(~37ms). There is no stress test in e2e yet, so the number may not be useful.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28387)
<!-- Reviewable:end -->
2016-08-11 02:33:55 -07:00
Wojciech Tyczynski acfd8c787f Avoid computing super-expensive DeepEqual on every pod update 2016-08-11 08:35:36 +02:00
Wojciech Tyczynski 1c9e623045 Remove dead variable from reflector 2016-08-11 08:32:37 +02:00
Dawn Chen 6d6fb037b5 Marked NodePhase deprecated. 2016-08-10 17:55:58 -07:00
Yu-Ju Hong 8e48221c24 kubelet: mark source ready after updating the cache
This ensures that cleanup routines don't start until the cache content is
up-to-date.
2016-08-10 17:55:10 -07:00
Jess Frazelle c0f4bd38ff
enable golint for pkg/security/podsecuritypolicy/capabilities
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:46:19 -07:00
Jess Frazelle 7e9d82129e
fix go vet errors
Signed-off-by: Jess Frazelle <jessfraz@google.com>

fix composites

Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-08-10 16:45:41 -07:00
Kubernetes Submit Queue 1d4e0ea3c1 Merge pull request #30341 from sttts/sttts-simplify-deepcopy-canonical-element
Automatic merge from submit-queue

Simplify canonical element term in deepcopy

Replace the old functional canonical element term in deepcopy registration with direct struct instantiation.

The old way was an artifact of non-uniform pointer/non-pointer types in the signature of deepcopy function. Since we changed that to always be a pointer, we can simplify the code.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30341)
<!-- Reviewable:end -->
2016-08-10 16:34:07 -07:00
Kubernetes Submit Queue 48b7aca2c9 Merge pull request #29672 from lixiaobing10051267/masterLen
Automatic merge from submit-queue

Add handling empty index key that may cause panic issue

if len(indexKeys) == 0, "return indexKeys[0]" will cause unexpected result.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29672)
<!-- Reviewable:end -->
2016-08-10 14:29:45 -07:00
Davanum Srinivas e1ad642da0 Fix intermittent failures in TestPidOf {procfs}
Bailout if WalkFunc is called with an error.

Fixes #30377
2016-08-10 17:23:58 -04:00
Davanum Srinivas ce93cb9d9c Remove kubelet dependency on pkill
Issue #26093 identified pkill as one of the dependencies of kublet
which could be worked around.  Build on the code introduced for pidof
and regexp for the process(es) we need to send a signal to.

Related to #26093
2016-08-10 17:14:49 -04:00
Chao Xu 41572cb22d add metrics to gc 2016-08-10 12:45:06 -07:00
Kubernetes Submit Queue a40d2cd92e Merge pull request #30296 from deads2k/wq-metrics
Automatic merge from submit-queue

add metrics for workqueues

Adds prometheus metrics to work queues and enables them for the resourcequota controller.  It would be easy to add this to all other workqueue based controllers and gather basic responsiveness metrics.

@kubernetes/rh-cluster-infra helps debug quota controller responsiveness problems.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30296)
<!-- Reviewable:end -->
2016-08-10 11:13:13 -07:00
Kubernetes Submit Queue 24ee4e8eb1 Merge pull request #30291 from dims/fix-issue-30290
Automatic merge from submit-queue

Prevent panic in 'kubectl exec' when redirecting stdout

Just add some nil checks to make sure we don't trip over when
we redirect output from exec to a file.

Fixes #30290

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30291)
<!-- Reviewable:end -->
2016-08-10 10:33:15 -07:00
Michael Taufen e43ccdbf2c Rename KubeletConfiguration.Config to PodManifestPath for clarity
Also provide a new --pod-manifest-path flag and deprecate the old
--config one.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose.
2016-08-10 09:40:21 -07:00
Kubernetes Submit Queue a69054f9c3 Merge pull request #30368 from wojtek-t/log_terminating_all_watchers
Automatic merge from submit-queue

Log warning when terminating all watchers

Ref #30275

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30368)
<!-- Reviewable:end -->
2016-08-10 09:26:07 -07:00
Wojciech Tyczynski 497f891cfb Log warning when terminating all watchers 2016-08-10 17:04:10 +02:00
Kubernetes Submit Queue 473425200f Merge pull request #29841 from mfojtik/fix-label-selector
Automatic merge from submit-queue

Do not re-initialize the output on label selector conversion

This conversion will always kill whatever is passed in the output.

@kargakis @deads2k PTAL

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29841)
<!-- Reviewable:end -->
2016-08-10 08:02:30 -07:00
Kubernetes Submit Queue c97b76326c Merge pull request #30328 from janetkuo/sj-log-fix
Automatic merge from submit-queue

Fix incorrect logging format in sj controller



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30328)
<!-- Reviewable:end -->
2016-08-10 07:10:13 -07:00
deads2k b981ea1a70 add metrics for workqueues 2016-08-10 09:28:42 -04:00
lixiaobing10051267 254189a5f2 check validation with no apps client in kubectl util factory 2016-08-10 21:20:50 +08:00
Kubernetes Submit Queue cc7d509e47 Merge pull request #30227 from soltysh/remove_seconds
Automatic merge from submit-queue

Remove seconds from scheduled jobs cron format

@erictune @janetkuo as promised this removes the seconds from the cron format

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30227)
<!-- Reviewable:end -->
2016-08-10 03:50:30 -07:00
Kubernetes Submit Queue a9af8a56b4 Merge pull request #30325 from ronnielai/test1
Automatic merge from submit-queue

Fixing a potential container deletion GC timing issue 

If pod manager is updated before all containers in a pod are deleted, the container clean up logic should still be triggered.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30325)
<!-- Reviewable:end -->
2016-08-10 03:13:13 -07:00
Maciej Szulik 902ecd85fc Remove seconds from scheduled jobs cron format 2016-08-10 11:15:33 +02:00
Kubernetes Submit Queue ba1666fb7b Merge pull request #30293 from girishkalele/kube-proxy-hostname
Automatic merge from submit-queue

kube-proxy: Propagate hostname to iptables proxier

Need to propagate the hostname (i.e. Nodename) from kube-proxy to the iptables proxier to allow kube-proxy to determine local endpoints.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30293)
<!-- Reviewable:end -->
2016-08-10 02:00:37 -07:00
Kubernetes Submit Queue 0da589fa9c Merge pull request #30197 from hongchaodeng/r1
Automatic merge from submit-queue

storage interface: remove Backends()



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30197)
<!-- Reviewable:end -->
2016-08-10 00:45:29 -07:00
bindata-mockuser 6cce4534f8 Update generated code 2016-08-10 09:12:40 +02:00
Kubernetes Submit Queue 70d6d165d5 Merge pull request #30002 from dims/remove-pidof-dependency
Automatic merge from submit-queue

Remove kubelet dependency on pidof

Issue #26093 identified pidof as one of the dependencies of kublet
which could be worked around. In this PR, we just look at /proc
to construct the list of pids we need for a specified process
instead of running "pidof" executable

Related to #26093

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30002)
<!-- Reviewable:end -->
2016-08-09 23:32:51 -07:00
Kubernetes Submit Queue 19a8f0f902 Merge pull request #29914 from tmrts/kubelet-rkt-cri/image-store
Automatic merge from submit-queue

Kubelet rkt CRI ImageService

Contains the ImageService stub and the basic tests for the implementation.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29914)
<!-- Reviewable:end -->
2016-08-09 22:18:12 -07:00
Kubernetes Submit Queue 01d6ac64b4 Merge pull request #29898 from matttproud/refactor/simplify/garbagecollector
Automatic merge from submit-queue

pkg/controller/garbagecollector: simplify mutexes.

pkg/controller/garbagecollector: simplified synchronization and made idiomatic.


Similar to #29598, we can rely on the zero-value construction behavior
to embed `sync.Mutex` into parent structs.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29898)
<!-- Reviewable:end -->
2016-08-09 21:39:26 -07:00
Kubernetes Submit Queue 64af5b074e Merge pull request #29594 from xiang90/fix_panic
Automatic merge from submit-queue

apiserver: fix timeout handler

Protect access of the original writer. Panics if anything has wrote
into the original writer or the writer is hijacked when times out.

Fix #29001 

/cc @smarterclayton @lavalamp 

The next step would be respect the request context once 1.7 is out.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29594)
<!-- Reviewable:end -->
2016-08-09 17:48:33 -07:00
Janet Kuo 7eeba370e2 Fix incorrect logging format in sj controller 2016-08-09 17:46:35 -07:00
Kubernetes Submit Queue f53a35fb76 Merge pull request #29147 from caesarxuchao/cut-client-repo-staging
Automatic merge from submit-queue

Cut the client repo, staging it in the main repo

Tracking issue: #28559
ref: https://github.com/kubernetes/kubernetes/pull/25978#issuecomment-232710174

This PR implements the plan a few of us came up with last week for cutting client into its own repo:
1. creating "_staging" (name is tentative) directory in the main repo, using a script to copy the client and its dependencies to this directory
2. periodically publishing the contents of this staging client to k8s.io/client-go repo
3. converting k8s components in the main repo to use the staged client. They should import the staged client as if the client were vendored. (i.e., the import line should be `import "k8s.io/client-go/<pacakge name>`). This requirement is to ease step 4.
4. In the future, removing the staging area, and vendoring the real client-go repo.

The advantage of having the staging area is that we can continuously run integration/e2e tests with the latest client repo and the latest main repo, without waiting for the client repo to be vendored back into the main repo. This staging area will exist until our test matrix is vendoring both the client and the server.

In the above plan, the tricky part is step 3. This PR achieves it by creating a symlink under ./vendor, pointing to the staging area, so packages in the main repo can refer to the client repo as if it's vendored. To prevent the godep tool from messing up the staging area, we export the staged client to GOPATH in hack/godep-save.sh so godep will think the client packages are local and won't attempt to manage ./vendor/k8s.io/client-go.

This is a POC. We'll rearrange the directory layout of the client before merge.

@thockin @lavalamp @bgrant0607 @kubernetes/sig-api-machinery

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29147)
<!-- Reviewable:end -->
2016-08-09 17:12:14 -07:00
Davanum Srinivas 1fdcea28e5 Remove kubelet dependency on pidof
Issue #26093 identified pidof as one of the dependencies of kublet
which could be worked around. In this PR, we just look at /proc
to construct the list of pids we need for a specified process
instead of running "pidof" executable

Related to #26093
2016-08-09 19:55:24 -04:00
bindata-mockuser 8ee2dc88f2 Container deletion should still happen when pod is removed from pod manager 2016-08-09 16:51:55 -07:00
Chao Xu adb75e1fd1 generated staging area 2016-08-09 14:07:54 -07:00
Xiang Li c995050ee3 apiserver: fix timeout handler
Protect access of the original writer. Panics if anything has wrote
into the original writer or the writer is hijacked when times out.
2016-08-09 12:39:40 -07:00
juanvallejo af37981812 return err on kubectl run --image with invalid value 2016-08-09 15:05:44 -04:00
Kubernetes Submit Queue bd421c9618 Merge pull request #29399 from timothysc/etcd3_scripts
Automatic merge from submit-queue

Update etcd 2.2 references to use 3.0.x

This update an assortment of etcd 2.2.X references to 3.0.4 in the code base.  

/cc @hongchaodeng 

xref: https://github.com/kubernetes/kubernetes/issues/22448

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29399)
<!-- Reviewable:end -->
2016-08-09 11:54:06 -07:00
Davanum Srinivas b15219034d Prevent panic in 'kubectl exec' when redirecting stdout
Just add some nil checks to make sure we don't trip over when
we redirect output from exec to a file.

Fixes #30290
2016-08-09 14:52:55 -04:00
Kubernetes Submit Queue b39cde37c9 Merge pull request #29212 from sjenning/hpa-idling
Automatic merge from submit-queue

HPA: ignore scale targets whose replica count is 0

Disable HPA when the user (or another component) explicitly sets the replicas to 0.

Fixes #28603

@kubernetes/autoscaling @fgrzadkowski @kubernetes/rh-cluster-infra @smarterclayton @ncdc

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29212)
<!-- Reviewable:end -->
2016-08-09 10:44:56 -07:00
Girish Kalele 5d6abf59ff kube-proxy: Propagate hostname to iptables proxier 2016-08-09 10:05:29 -07:00
Kubernetes Submit Queue 4d9762e7a0 Merge pull request #29722 from AdoHe/range_registry
Automatic merge from submit-queue

move RangeRegistry to a separate package for generic usage

Fix #29668, @smarterclayton @lavalamp ptal.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29722)
<!-- Reviewable:end -->
2016-08-09 09:47:57 -07:00
Seth Jennings c5e82a01b1 hpa: ignore scale targets whose replica count is 0 2016-08-09 11:11:17 -05:00
Timothy St. Clair 24993b0343 Update generated files due to dependency shift.
Also minor bug fix in federation api.
2016-08-09 10:41:09 -05:00
Timothy St. Clair 4adb23c8cc Update dependency shift from etcd3 changes in latest release. 2016-08-09 08:51:15 -05:00
Kubernetes Submit Queue 301be4eeb5 Merge pull request #29272 from mksalawa/pending
Automatic merge from submit-queue

Modify predicate() interface to return all failed predicates

As stated in the comments below, this is the first step of showing the user all predicates that failed for a given node when scheduling of a given pod failed on every node.
ref #20064

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29272)
<!-- Reviewable:end -->
2016-08-09 06:37:06 -07:00
Kubernetes Submit Queue da53a24763 Merge pull request #29993 from mksalawa/remove_etcd_default_in_genericapiserver
Automatic merge from submit-queue

Remove default etcd validation in generic apiserver

Moving verification of `--etcd-servers` to the concrete apiserver instead of checking during defaulting in generic apiserver.

The context for this change is that heapster (will be another apiserver) doesn't need to have etcd underneath.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29993)
<!-- Reviewable:end -->
2016-08-09 06:01:48 -07:00
Tamer Tas 77777d5586 Test rkt CRI shim ImageStore 2016-08-09 15:56:34 +03:00
mksalawa 2749ec7555 Create PredicateFailureReason, modify scheduler predicate interface. 2016-08-09 14:01:46 +02:00
mksalawa a806351cc3 Extract etcd options from genericapiserver. 2016-08-09 13:35:53 +02:00
Kubernetes Submit Queue 15ad9be67f Merge pull request #30249 from hongchaodeng/fix
Automatic merge from submit-queue

make reousrce prefix assignment consistent

Make reousrce prefix assignment consistent with other registries

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30249)
<!-- Reviewable:end -->
2016-08-09 03:40:29 -07:00
Dominika Hodovska ae584d8114 kubectl: Convert port-forward cmd to complete/validate/run structure 2016-08-09 12:10:04 +02:00
Kubernetes Submit Queue 899d98ad15 Merge pull request #29983 from wojtek-t/configurable_cache_sizes
Automatic merge from submit-queue

Configure cache sizes based on cluster size

@fabioy

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29983)
<!-- Reviewable:end -->
2016-08-09 03:04:44 -07:00
Kubernetes Submit Queue 94fc389daa Merge pull request #29837 from thockin/validate-dotdot-in-projections
Automatic merge from submit-queue

Validate .. in projections, fix tests

I noticed this when reviewing another PR.  I fixed it but the test was beyond comprehension, so I fixed that too.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29837)
<!-- Reviewable:end -->
2016-08-09 02:31:58 -07:00
Wojciech Tyczynski 8a8cd06ea4 Configurable cache sizes of cachers 2016-08-09 09:41:48 +02:00
Kubernetes Submit Queue 70d6fe6d1c Merge pull request #30255 from Random-Liu/add-container-port-label
Automatic merge from submit-queue

Kubelet: Add container ports label.

Addresses https://github.com/kubernetes/kubernetes/pull/30049#discussion_r73983952.

Add container ports label, although we don't use it now, it will make it easier to switch to new runtime interface in the future.

@yujuhong @feiskyer
2016-08-08 23:28:05 -07:00
Kubernetes Submit Queue f218aa4b10 Merge pull request #30236 from mikedanese/csr-approval
Automatic merge from submit-queue

csr: add approval to the typed client

ref #30163

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30236)
<!-- Reviewable:end -->
2016-08-08 22:54:19 -07:00
Hongchao Deng 5bf2efc581 make reousrce prefix consistent with other registries 2016-08-08 22:19:39 -07:00
AdoHe a6539f846a move RangeRegistry to a separate package for generic usage 2016-08-09 13:10:48 +08:00
Kubernetes Submit Queue b0ea89c2f6 Merge pull request #30049 from feiskyer/kuberuntime-labels
Automatic merge from submit-queue

Kubelet: implement labels for new runtime API

Implement labels for new runtime API. Part of #28789 . 


CC @yujuhong @Random-Liu @kubernetes/sig-node

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30049)
<!-- Reviewable:end -->
2016-08-08 21:39:38 -07:00
Jordan Liggitt d756b29654
Set user info in CertificateSigningRequest.Spec on create 2016-08-08 23:33:41 -04:00
Kubernetes Submit Queue a9b6f695da Merge pull request #28480 from caesarxuchao/gc-save-only-meta
Automatic merge from submit-queue

[GarbageCollector] only store typeMeta and objectMeta in the gc store

GC only needs to know the apiVersion, kind, and objectMeta of an object. This PR makes the stores of GC only save these fields.
cc @kubernetes/sig-api-machinery

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28480)
<!-- Reviewable:end -->
2016-08-08 20:28:37 -07:00
Jordan Liggitt 4db004972a
Plumb context to strategy methods 2016-08-08 22:33:25 -04:00
Pengfei Ni e8fcafc925 Kubelet: implement labels for kuberuntime 2016-08-09 10:01:45 +08:00
Random-Liu ade092fe77 Add container ports label. 2016-08-08 18:40:18 -07:00
Kubernetes Submit Queue 16621cd32d Merge pull request #30022 from juanvallejo/jvallejo_add-timeout-unit-to-scale-help
Automatic merge from submit-queue

Update scale cmd help to display duration "units" in --timeout usage

release-note-none

`kubectl scale` has `--timeout` option, but the help info does not give accepted time units.

The help info gives default value 0 without a unit, potentially misleading a user into thinking they need to pass the numbered time only.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30022)
<!-- Reviewable:end -->
2016-08-08 17:58:02 -07:00
Chao Xu 4d2350632c only store typeMeta and objectMeta in the gc store 2016-08-08 17:23:13 -07:00
Kubernetes Submit Queue d52204a1aa Merge pull request #27109 from asalkeld/more-create-commands
Automatic merge from submit-queue

Add service and deployment create sub-commands to kubectl

```release-note
Added new commands kubectl create service & kubectl create deployment
```
Partial #25382
2016-08-08 16:53:18 -07:00
Mike Danese c131fbaf17 csr: add approval to the typed client 2016-08-08 16:05:05 -07:00
Kara Alexandra 4c959c0b23 Make more messages respect --quiet flag
- "If you don't see a command prompt, try pressing enter."
- "Pod "name" deleted"

Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-08 14:24:44 -07:00
Kubernetes Submit Queue fbcb946db9 Merge pull request #30231 from derekwaynecarr/inodes-summary-api
Automatic merge from submit-queue

Add total inodes to kubelet summary api

Needed to support inode based eviction thresholds as a percentage.

/cc @ronnielai @vishh @kubernetes/rh-cluster-infra
2016-08-08 12:59:52 -07:00
Kubernetes Submit Queue 5eb088ebed Merge pull request #30172 from yujuhong/interface_cleanup
Automatic merge from submit-queue

Repalce rawContainerID with containerID
2016-08-08 11:48:43 -07:00
derekwaynecarr 2563696719 Add total inodes to kubelet summary api 2016-08-08 12:20:14 -04:00
Michal Rostecki 31cdd70808 Set pod state as "unknown" when CNI plugin fails
Before this change, CNI plugin failure didn't change anything in
the pod status, so pods having containers without requested
network were "running".

Fixes #29148
2016-08-08 17:55:19 +02:00
Tamer Tas 81fb8e1e11 pkg/util/exec: don't specify paths for echo
`ex.Command()` already searches the binary in PATH, no need to manually
specify it. `pkg/util/exec` tests fail in non-conventional environments
due to this (e.g. NixOS).
2016-08-08 16:17:25 +03:00
Kubernetes Submit Queue 5acf6fb03d Merge pull request #30188 from caesarxuchao/fix-authorization-1.4-client
Automatic merge from submit-queue

Install authorization group in 1.4 client

By the way, buried in my other PR there is an e2e test which will remind people adding this line.

@deads2k
2016-08-08 05:46:56 -07:00
Jan Safranek 3c5364954b Fix PVC.Status.Capacity and AccessModes after binding
Also, fix unit tests to have the same claim and volume sizes in most of the
tests where we don't test matching based on size and test for a specific size
when we do actually test the matching.
2016-08-08 10:45:42 +02:00
Angus Salkeld bd0b7528b5 Add "create deployment" sub-command 2016-08-08 13:24:30 +10:00
Angus Salkeld 42ca885edb Add "create service" sub-commands
This adds:
 create service clusterip
 create service nodeport
 create service loadbalancer
2016-08-08 12:31:21 +10:00
Angus Salkeld 2f7a1612db Fix namespace_test error message 2016-08-08 12:08:57 +10:00
Hongchao Deng 7f28eda9be storage interface: remove Backends() 2016-08-07 16:10:18 -07:00
Kubernetes Submit Queue 148b74881b Merge pull request #30181 from mikedanese/csr-delete
Automatic merge from submit-queue

add delete strategy to certificates registry

So that CSRs can be deleted.

cc @gtank 

```console
$ kubectl delete certificatesigningrequest foo
error: error when deleting "foo": http: server closed connection
```
and on the apiserver:
```
E0806 00:11:53.791039       5 runtime.go:64] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:70
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:63
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:49
/usr/local/go/src/runtime/asm_amd64.s:472
/usr/local/go/src/runtime/panic.go:443
/usr/local/go/src/runtime/panic.go:62
/usr/local/go/src/runtime/sigpanic_unix.go:24
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953
/usr/local/go/src/runtime/asm_amd64.s:1998
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x20 pc=0xa268ee]

goroutine 1161 [running]:
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:481 +0x3e6
k8s.io/kubernetes/pkg/util/runtime.HandleCrash(0xc821ecbef8, 0x1, 0x1)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:56 +0x153
panic(0x2a00240, 0xc820014070)
        /usr/local/go/src/runtime/panic.go:443 +0x4e9
k8s.io/kubernetes/pkg/api/rest.objectMetaAndKind(0x0, 0x0, 0x7faf1332ee78, 0xc8220f0600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/create.go:115 +0x1ee
k8s.io/kubernetes/pkg/api/rest.BeforeDelete(0x0, 0x0, 0x7faf13188338, 0xc821e218f0, 0x7faf1332ee78, 0xc8220f0600, 0xc821eb11c0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/api/rest/delete.go:50 +0x94
k8s.io/kubernetes/pkg/registry/generic/registry.(*Store).Delete(0xc82013c9a0, 0x7faf13188338, 0xc821e218f0, 0xc821e0bdde, 0xa, 0xc821eb11c0, 0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/registry/generic/registry/store.go:634 +0x3b8
k8s.io/kubernetes/pkg/apiserver.DeleteResource.func1.1(0x0, 0x0, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:799 +0xa4
k8s.io/kubernetes/pkg/apiserver.finishRequest.func1(0xc821e081e0, 0xc821eb12c0, 0xc821e08000, 0xc821e0bf80)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:953 +0xd9
created by k8s.io/kubernetes/pkg/apiserver.finishRequest
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/apiserver/resthandler.go:958 +0xf1
```
2016-08-07 13:04:35 -07:00
Chao Xu 58b6dee275 install authorization group in 1.4 client 2016-08-06 11:21:41 -07:00
Kubernetes Submit Queue 9132b68866 Merge pull request #30133 from ZTE-PaaS/zhangke-patch-022
Automatic merge from submit-queue

refractoring findContainerStatus of status_manager

make findContainerStatus of status_manager simple
2016-08-06 03:36:01 -07:00
Kubernetes Submit Queue b91de274c7 Merge pull request #30129 from lixiaobing10051267/masterName
Automatic merge from submit-queue

make correction to two variables in inverse order

from Fprintf info ""Renaming %s to %s\n", it should be renamed from old to new.
2016-08-06 03:01:14 -07:00
Kubernetes Submit Queue 3dad8f7c06 Merge pull request #29907 from luxas/lookup_ip_better
Automatic merge from submit-queue

[kubelet] Auto-discover node IP if neither cloud provider exists and IP is not explicitly specified

One example where the earlier implementation failed is when running kubelet on CoreOS (bare-metal), where the nameserver is set to `8.8.8.8`. kubelet tries to lookup the node name agains Google DNS, which obviously fails. The kubelet won't recover after that.

The workaround hsa been to set `--hostname-override` to an IP address, but it's quite annoying to try to make a multi-distro way of getting the IP in bash for example. This way is much cleaner.

Refactored the function a little bit at the same time

@vishh @yujuhong @resouer @Random-Liu
2016-08-06 02:26:30 -07:00
Kubernetes Submit Queue 94905bd7c0 Merge pull request #29619 from dims/fix-issue-23163
Automatic merge from submit-queue

Verify volume.GetPath() never returns ""

Add a new helper method volume.GetPath(Mounter) instead of calling
the GetPath() of the Mounter directly. Check if GetPath() is returning
a "" and convert that into an error.

Fixes #23163
2016-08-06 01:44:15 -07:00
Chao Xu a771578a1c move pkg/util/ files to their own package to reduce client-go dependencies 2016-08-05 23:32:02 -07:00
Kubernetes Submit Queue 5f44431275 Merge pull request #30007 from ericchiang/kubectl-config-set-credentials-auth-providers
Automatic merge from submit-queue

kubectl config set-crentials: add arguments for auth providers

This PR adds `--auth-provider` and `--auth-provider-arg` flags to the
`kubectl config set-credentials` sub-command.

There's currently no way of interacting with the new auth provider framework added in #23066 through kubectl. You have to render a custom kubeconfig to use them. Additionally `kubectl config set` just sort of craps out when attempting to interact with authentication info objects (#29312).

This is a minimal implementation of allowing `kubect config set-credentials` to set fields for client auth providers.

cc @cjcullen @kubernetes/kubectl
2016-08-05 22:22:22 -07:00
Kubernetes Submit Queue e628f6fa1d Merge pull request #29442 from xiangpengzhao/fix-log-info
Automatic merge from submit-queue

Log more info of container for debugging.
2016-08-05 19:19:19 -07:00
Kubernetes Submit Queue 9083ee971e Merge pull request #29137 from janetkuo/scheduledjob-controller
Automatic merge from submit-queue

Scheduledjob controller

Supersedes #25952; first 7 commits come from #25816

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

```release-note
```
2016-08-05 18:07:48 -07:00
Mike Danese d2ff93d19d add delete strategy to certificates registry
so that csrs can be deleted.
2016-08-05 17:34:03 -07:00
lixiaobing10051267 7d3d6a7f64 t.Errorf output wrong variables in identity_mapper_test.go 2016-08-06 07:48:40 +08:00
Yu-Ju Hong 93f0c5a8e5 Repalce rawContainerID with containerID 2016-08-05 16:26:47 -07:00
Kubernetes Submit Queue 2537f66f0e Merge pull request #29230 from luxas/goimport
Automatic merge from submit-queue

Run goimport for the whole repo

While removing GOMAXPROC and running goimports, I noticed quite a lot of other files also needed a goimport format. Didn't commit `*.generated.go`, `*.deepcopy.go` or files in `vendor`

This is more for testing if it builds.
The only strange thing here is the gopkg.in/gcfg.v1 => github.com/scalingdata/gcfg replace.
cc @jfrazelle @thockin
2016-08-05 16:22:01 -07:00
Kubernetes Submit Queue e84a8ec45a Merge pull request #28991 from ZTE-PaaS/zhangke-patch-008
Automatic merge from submit-queue

optimize conditions of ServiceReplenishmentUpdateFunc to replenish service

Originally, the  replenishQuota method didn't focus on the third parameter object even if others transfered to it, i think the function is not efficient and perfect. then i use the third param to get MatchResources, it will be more exact. for example, if the old pod was quota tracked and the new was not, the replenishQuota only focus on usage resource of the old pod, still if  the third parameter object is nil, the process will be same as before
2016-08-05 15:45:46 -07:00
Kubernetes Submit Queue 5f9447a91a Merge pull request #20573 from deads2k/plumb-in-SAR
Automatic merge from submit-queue

add subjectaccessreviews resource

Adds a subjectaccessreviews endpoint that uses the API server's authorizer to determine if a subject is allowed to perform an action.

Part of kubernetes/features#37
2016-08-05 14:39:28 -07:00
Mike Danese 0ca2511b37 add shortname for certificate signing request 2016-08-05 14:17:14 -07:00
Janet Kuo da57c93a8a Fix errors, verification and test failures; add unit test for sj UpdateStatus 2016-08-05 13:35:39 -07:00
Eric Tune 8b2e248641 Add test and doc.go 2016-08-05 13:34:50 -07:00
Eric Tune 8675e014fb ScheduledJob controller 2016-08-05 13:34:50 -07:00
Kubernetes Submit Queue f9cadb290b Merge pull request #22919 from liggitt/http-test-etcd
Automatic merge from submit-queue

Allow starting test etcd with http

There are cases where we'll want to start a test etcd without https (external tools monitoring tests, tests with lots of parallelism, etc). This makes it an option.

Helps with https://github.com/kubernetes/kubernetes/issues/23127

<!-- Reviewable:start -->
---
This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/22919)
<!-- Reviewable:end -->
2016-08-05 12:06:12 -07:00
Kubernetes Submit Queue 807241b84f Merge pull request #25707 from dims/fix-issue-14071
Automatic merge from submit-queue

Fix Incorrect response model for pods/{name}/log

The swagger spec for pods/{name}/log does not include
"text/plain" as a possible content-type for the the response.
So we implement ProducesMIMETypes to make sure "text/plain"
gets added to the default list ot content-types.

the v1.json was generated by running:
hack/update-generated-swagger-docs.sh;./hack/update-swagger-spec.sh;
2016-08-05 11:06:44 -07:00
Kubernetes Submit Queue e4b067efd0 Merge pull request #30125 from lixiaobing10051267/masterFormat
Automatic merge from submit-queue

Wrong format is used with single quotes in log

Wrong format is used with single quotes in log, should use ""
2016-08-05 10:29:52 -07:00
deads2k d9a203409a initial generated code for SAR 2016-08-05 11:37:43 -04:00
deads2k 32920b5617 add subjectaccessreviews resource 2016-08-05 11:20:56 -04:00
Davanum Srinivas e7a46a7c81 Fix Incorrect response model for pods/{name}/log
The swagger spec for pods/{name}/log does not include
"text/plain" as a possible content-type for the the response.
So we implement ProducesMIMETypes to make sure "text/plain"
gets added to the default list ot content-types.

the v1.json was generated by running:
hack/update-generated-swagger-docs.sh;./hack/update-swagger-spec.sh;

Fixes #14071
2016-08-05 08:54:14 -04:00
Davanum Srinivas ecda7c60c1 Allow empty value for env in kubectl run
Fixes #28734
2016-08-05 08:47:53 -04:00
Davanum Srinivas e0edfebe82 Verify volume.GetPath() never returns ""
Add a new helper method volume.GetPath(Mounter) instead of calling
the GetPath() of the Mounter directly. Check if GetPath() is returning
a "" and convert that into an error. At this point, we only have
information about the type of the Mounter, so let's log that if
there is a problem

Fixes #23163
2016-08-05 08:45:33 -04:00
Kubernetes Submit Queue 34e51d8ce9 Merge pull request #30095 from ronnielai/image-gc-2
Automatic merge from submit-queue

Moving image gc to pkg/kubelet/images
2016-08-05 03:11:33 -07:00
Ke Zhang 08d01a3879 refractoring findContainerStatus of status_manager 2016-08-05 17:52:02 +08:00
Kubernetes Submit Queue a13efbc01a Merge pull request #30070 from deads2k/fix-alias
Automatic merge from submit-queue

replace improper create quota alias

`q` is not a shortname for `resourcequota`, so it shouldn't be an alias for `kubectl create resourcequota`.

@sttts ptal
2016-08-05 02:36:44 -07:00
lixiaobing10051267 849a8df35d make correction to two variables in inverse order 2016-08-05 16:17:01 +08:00
Ke Zhang 1c13540671 get workers length shoud use RLock 2016-08-05 16:05:18 +08:00
lixiaobing10051267 11f5ced9d3 Wrong format is used with single quotes in log 2016-08-05 15:23:23 +08:00
Kubernetes Submit Queue 4d1da37129 Merge pull request #30021 from pweil-/protobuf-recognizingdecoder
Automatic merge from submit-queue

add asserts for RecognizingDecoder and update protobuf serializer

Ensure that serializers are asserting that they implement the `RecognizingDecoder` interface and update the protobuf serializer to add the `unknown` parameter.

Manifested in: https://github.com/openshift/origin/issues/9739

@smarterclayton @deads2k
2016-08-04 22:28:00 -07:00
Kubernetes Submit Queue 996df923a1 Merge pull request #30020 from hongchaodeng/fix
Automatic merge from submit-queue

make reousrce prefix consistent with other registries

Storage class registry was added recently in #29694.
In other registries, resource prefix was changed to a more generic way using RESTOptions.ResourcePrefix.

This PR is an attempt to make both consistent.
2016-08-04 21:56:09 -07:00
Kubernetes Submit Queue b1f8ba9ddf Merge pull request #30014 from dims/remove-uname-dependency
Automatic merge from submit-queue

Remove kubelet dependency on uname

Let's avoid exec'ing stuff we don't have to.

Related to #26093
2016-08-04 21:22:25 -07:00
Kubernetes Submit Queue e7d01097dc Merge pull request #29971 from caesarxuchao/fix-kubectl-rolling-update-with-gc
Automatic merge from submit-queue

[GarbageCollector] Fix kubectl rolling-update to work with GC

This changes the order of the [Rename()](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532) function. After the change, Rename() first deletes the old RC and orphans its pods, then creates the new RC, which will then have a chance to adopt the orphaned pods.

This also fixes the "should support rolling-update to same image" [test](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/kubectl.go#L915) when the garbage collector is on.

Here is the detailed explanation on why the test would have failed:
`kubectl rolling-update` will [rename](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/rolling_updater.go#L532-L546) the RC. It first creates the an identical RC (including spec.selectors) with the new name, then it deletes the existing RC. When GC is turned on, the newly created RC cannot adopt the existing pod, because it has a controllerRef pointing to the exising RC, so the new RC will create new pods and expect to see the creation. However, the new RC and the old RC have the same selector, so sometimes the old RC, instead of the new RC, has its [expectation lowered](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346-L362), the new RC's expectation will stuck forever. The e2e test then times out when executing `kubectl delete newRC`, because there is the new RC will not scale down as its expectation is not fulfilled.

A side-note, we should fix [rm.getPodController()](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller.go#L346) to respect pod's controllerref, that will prevent similar bugs.

Also note that an old version `kubectl rolling-update` will not work with the GC. We cannot fix that.
2016-08-04 20:48:10 -07:00
Kubernetes Submit Queue c393f11261 Merge pull request #29968 from ZTE-PaaS/zhangke-patch-014
Automatic merge from submit-queue

optimize lock of runtimeState stuct

use sync.RWMutex may be high effective for concorrent read
2016-08-04 20:03:47 -07:00
Kubernetes Submit Queue 7921a9ce67 Merge pull request #25816 from soltysh/scheduledjob_kubectl
Automatic merge from submit-queue

ScheduledJob kubectl

@erictune the last part (kubectl) of the ScheduledJob, as usual builds on top of previous PRs, so only last 2 commits matter (the kubectl one and storage leftovers).

```release-note
* Introducing ScheduledJobs as described in [the proposal](https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md) as part of `batch/v2alpha1` version (experimental feature).
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-08-04 17:36:07 -07:00
Kubernetes Submit Queue 4700b6fb3c Merge pull request #29880 from derekwaynecarr/disk-pressure-image-gc
Automatic merge from submit-queue

Node disk pressure should induce image gc

If the node reports disk pressure, prior to evicting pods, the node should clean up unused images.
2016-08-04 17:03:19 -07:00
Kubernetes Submit Queue b8dbb3e34a Merge pull request #30045 from lojies/addalias
Automatic merge from submit-queue

add alias for createconfigmap

add Aliases for cmd create configmap.
this is a supplement for [https://github.com/kubernetes/kubernetes/pull/29652]
2016-08-04 16:25:58 -07:00
Kubernetes Submit Queue 88f987e7e2 Merge pull request #29973 from ZTE-PaaS/zhangke-patch-016
Automatic merge from submit-queue

optimize podKiller for reading channel

Reading kl.podKillingCh should check whether ok first, then to process data
2016-08-04 16:25:54 -07:00
Eric Chiang 974473c45f kubectl config set-crentials: add arguments for auth providers
This PR adds `--auth-provider` and `--auth-provider-arg` flags to the
`kubectl config set-credentials` sub-command.
2016-08-04 16:23:40 -07:00
Kubernetes Submit Queue 07b650e165 Merge pull request #29844 from ZTE-PaaS/zhangke-patch-013
Automatic merge from submit-queue

make the removing pods log standardized
2016-08-04 15:52:34 -07:00
Kubernetes Submit Queue 44c8ed1a64 Merge pull request #28353 from deads2k/refactor-quota-calculation
Automatic merge from submit-queue

refactor quota calculation for re-use

Refactors quota calculation to allow reuse. This will allow us to do "punch through" calculation inside of admission if a particular quota needs usage stats and allows downstream re-use by moving calculation closer to the evaluators and separating "needs calculation" logic from "do calculation".

@derekwaynecarr
2016-08-04 15:52:30 -07:00
Kubernetes Submit Queue d10e47b891 Merge pull request #29928 from dubstack/bump-libcontainer
Automatic merge from submit-queue

Bump Libcontainer to latest head

@Random-Liu or @yujuhong Can any one of you please do a quick review.

I updated libcontainer in a previous PR but  #29492 reverted those changes. This is needed for #27204. 

Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-08-04 15:12:13 -07:00
Kubernetes Submit Queue 0410c33995 Merge pull request #29204 from aledbf/ingress-wildcard-hosts
Automatic merge from submit-queue

Allow leading * in ingress hostname

fixes #29043
2016-08-04 14:38:24 -07:00
derekwaynecarr 68bc47ecc6 Add support to invoke image gc in response to disk eviction thresholds 2016-08-04 17:13:08 -04:00
Kubernetes Submit Queue c41c3d4d14 Merge pull request #25189 from mfanjie/kube-service-controller-rewritten
Automatic merge from submit-queue

Rewrite service controller to apply best controller pattern

This PR is a long term solution for #21625:
We apply the same pattern like replication controller to service controller to avoid the potential process order messes in service controller, the change includes:
1. introduce informer controller to watch service changes from kube-apiserver, so that every changes on same service will be kept in serviceStore as the only element.
2. put the service name to be processed to working queue
3. when process service, always get info from serviceStore to ensure the info is up-to-date
4. keep the retry mechanism, sleep for certain interval and add it back to queue.
5. remote the logic of reading last service info from kube-apiserver before processing the LB info as we trust the info from serviceStore.

The UT has been passed, manual test passed after I hardcode the cloud provider as FakeCloud, however I am not able to boot a k8s cluster with any available cloudprovider, so e2e test is not done.

Submit this PR first for review and for triggering a e2e test.
2016-08-04 14:05:51 -07:00
Kubernetes Submit Queue 8770b2e237 Merge pull request #29319 from juanvallejo/jvallejo_bugfix/single-resource-version-flag
Automatic merge from submit-queue

fix annotate.go single resource check

```release-note
Fix issue with kubectl annotate when --resource-version is provided.
```

When using `kubectl annotate` with a `--resource-version` on a resource, such as `kubectl annotate pod <pod_name> --resource-version=1820 description='myannotation'`, the command fails with the error: `error: --resource-version may only be used with a single resource`.

Upon printing the output of `resources` that the annotate command receives from cli args, it prints: `Resources:[pod <pod_name>]`. In other words, it treats the name of the resource as a second resource. This PR addresses this issue by using the resource builder `Singular` flag to determine if only a single resource was passed.
2016-08-04 13:26:50 -07:00
bindata-mockuser 0c76d85cc8 moving image gc to images 2016-08-04 12:26:06 -07:00
Chao Xu 2558c239b8 remove logWatcher to logf 2016-08-04 10:28:18 -07:00
Buddha Prakash 49201f6923 Update Libcontainer's Cgroup Config: AllowAllDevices to be Nil 2016-08-04 10:05:30 -07:00
juanvallejo 620758c7e9 format resource printing with aliases 2016-08-04 12:01:25 -04:00
Kubernetes Submit Queue 42a12a4cd6 Merge pull request #29978 from hodovska/sharedInformer-fixup
Automatic merge from submit-queue

SharedInformerFactory: usage and fixes

Follow-up for #26709
2016-08-04 09:00:23 -07:00
Kubernetes Submit Queue 8da97dff86 Merge pull request #30011 from janetkuo/map-concurrent-write-read
Automatic merge from submit-queue

Fix the map concurrent read/write issue in deployment controller

Fixes #29960

@lavalamp @kubernetes/deployment
2016-08-04 08:25:43 -07:00
derekwaynecarr 611c127f0d kubelet eviction manager support for min-reclaim 2016-08-04 11:17:44 -04:00
Kubernetes Submit Queue 8ab06a3f86 Merge pull request #29958 from ronnielai/dep
Automatic merge from submit-queue

Updated cadvisor version

cc @derekwaynecarr
2016-08-04 07:50:19 -07:00
Kubernetes Submit Queue d6854cbb6b Merge pull request #30062 from gambol99/spelling
Automatic merge from submit-queue

spelling mistakes

- fixing the spelling mistakes in aws.go
2016-08-04 07:13:19 -07:00
Kubernetes Submit Queue 0e71c0c808 Merge pull request #30031 from andreykurilin/apiserver_typo
Automatic merge from submit-queue

Fix various typos in apiserver pkg
2016-08-04 07:13:14 -07:00
Kubernetes Submit Queue c2340870c6 Merge pull request #29952 from fabianofranz/handle_container_terminated_pod_running_condition
Automatic merge from submit-queue

Handle container terminated but pod still running in conditions

Sometimes when you have a pod with more than one container, and the container runs and terminates really fast, `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.
2016-08-04 07:13:08 -07:00
deads2k 0beca8e6be replace improper create quota alias 2016-08-04 08:02:14 -04:00
Kubernetes Submit Queue 16454277aa Merge pull request #29930 from ericchiang/rbac-validation-dont-mix-non-resource-urls-and-resources
Automatic merge from submit-queue

rbac validation: rules can't combine non-resource URLs and regular resources

This PR updates the validation used for RBAC to prevent rules from mixing non-resource URLs and regular resources.

For example the following is no longer valid

```yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
  name: admins
rules:
  - apiGroups: ["*"]
    resources: ["*"]
    verbs: ["*"]
    nonResourceURLs: ["*"]
```

And must be rewritten as so.

```yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
  name: admins
rules:
  - apiGroups: ["*"]
    resources: ["*"]
    verbs: ["*"]
  - nonResourceURLs: ["*"]
    verbs: ["*"]
``` 

It also:
* Mandates non-zero length arrays for required resources.
* Mandates non-resource URLs only be used for ClusterRoles (not namespaced Roles).
* Updates the swagger validation so `verbs` are the only required field in a rule. Further validation is done by the server.

Also, do we need to bump the API version?

Discussed by @erictune and @liggitt  in #28304

Updates kubernetes/features#2

cc @kubernetes/sig-auth 

Edit:
* Need to update the RBAC docs if this change goes in.
2016-08-04 04:52:51 -07:00
Tamer Tas f027b7a896 Add ImageService stub for rkt CRI shim 2016-08-04 14:22:22 +03:00
Kubernetes Submit Queue 1933462c7b Merge pull request #29925 from ronnielai/container-gc
Automatic merge from submit-queue

Delete containers when pod is evicted

#29803
2016-08-04 04:20:02 -07:00
Rohith 0da5f50b03 - fixing the spelling mistakes 2016-08-04 10:17:59 +01:00
Ke Zhang 3973856ac2 replenish quota for service optimize, add testcase 2016-08-04 16:55:05 +08:00
Michal Fojtik e220f95da7 Do not re-initialize the output on label selector conversion 2016-08-04 10:18:42 +02:00
Kubernetes Submit Queue 74477a83e4 Merge pull request #29889 from janetkuo/deployment-e2e-test-fix
Automatic merge from submit-queue

Fix deployment e2e test: waitDeploymentStatus should error when entering an invalid state

Follow up #28162

1. We should check that max unavailable and max surge aren't violated at all times in e2e tests (didn't check this in deployment scaled rollout yet, but we should wait for it to become valid and then continue do the check until it finishes)
2. Fix some minor bugs in e2e tests 

@kubernetes/deployment
2016-08-04 00:43:41 -07:00
Dominika Hodovska 816f6d32ca Collapse duplicate informer creation paths 2016-08-04 09:02:13 +02:00
Dominika Hodovska 3afd822537 Watch for started informers in factory.start 2016-08-04 08:51:30 +02:00
Kubernetes Submit Queue 92518a8a32 Merge pull request #30036 from caesarxuchao/README-to-doc
Automatic merge from submit-queue

convert README.md to doc.go

It seems the convention is to use a doc.go, not a README.md.

I needed to work around this README.md when in #29147, see https://github.com/kubernetes/kubernetes/pull/29147#discussion-diff-73239124R73.
2016-08-03 23:28:55 -07:00
Kubernetes Submit Queue 0d53ef7b3b Merge pull request #29861 from xiangpengzhao/verify-secure-insecure-port-equal
Automatic merge from submit-queue

Verify if Secure and InsecurePort are equal for apiserver

If we specify the kube-apiserver flags `--secure-port` and `--insecure-port` with the same port, the server will print the below error info repeatedly. In fact, it's meaningless to do this. It should verify if the two flags are equal. If so, the server should give error info and exit directly.

```
root@vm:~# [restful] 2016/08/01 13:11:52 log.go:30: [restful/swagger] listing is available at https://172.16.1.11:8888/swaggerapi/
[restful] 2016/08/01 13:11:52 log.go:30: [restful/swagger] https://172.16.1.11:8888/swaggerui/ is mapped to folder /swagger-ui/
E0801 13:11:53.102232    2481 genericapiserver.go:733] Unable to listen for secure (listen tcp 0.0.0.0:8888: bind: address already in use); will try again.
E0801 13:12:08.116463    2481 genericapiserver.go:733] Unable to listen for secure (listen tcp 0.0.0.0:8888: bind: address already in use); will try again.
```

After fixing, the print is like this:
```
root@vm:~# F0801 11:51:44.308180    1921 genericapiserver.go:599] --secure-port and --insecure-port cannot use the same port.
goroutine 1 [running]:
k8s.io/kubernetes/vendor/github.com/golang/glog.stacks(0x4871d00, 0x0, 0x0, 0x0)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:766 +0xb8
k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).output(0x48517c0, 0xc800000003, 0xc820368000, 0x470aeab, 0x13, 0x257, 0x0)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:717 +0x259
k8s.io/kubernetes/vendor/github.com/golang/glog.(*loggingT).printf(0x48517c0, 0xc800000003, 0x3518280, 0x3b, 0x0, 0x0, 0x0)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:655 +0x1d4
k8s.io/kubernetes/vendor/github.com/golang/glog.Fatalf(0x3518280, 0x3b, 0x0, 0x0, 0x0)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:1145 +0x5d
k8s.io/kubernetes/pkg/genericapiserver.verifySecureAndInsecurePort(0xc820132800)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:599 +0xad
k8s.io/kubernetes/pkg/genericapiserver.ValidateRunOptions(0xc820132800)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:607 +0x4b
k8s.io/kubernetes/pkg/genericapiserver.DefaultAndValidateRunOptions(0xc820132800)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:611 +0x4e
k8s.io/kubernetes/cmd/kube-apiserver/app.Run(0xc8202c9560, 0x0, 0x0)
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:84 +0x8e
main.main()
	/home/paas/zxp/code/k8s/fork/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go:48 +0x111

[2]+  Exit 255
```

This will fix the same issue of federation-apiserver.

cc @lavalamp @quinton-hoole
2016-08-03 23:28:50 -07:00
Kubernetes Submit Queue 544851a19f Merge pull request #29796 from deads2k/token-review
Automatic merge from submit-queue

Token review endpoint

Unrevert of #28788, which was rolled back because of https://github.com/kubernetes/kubernetes/issues/29375


@cjcullen @wojtek-t I'd like to remerge if possible.  Have we gotten the field checking mentioned here relaxed? https://github.com/kubernetes/kubernetes/pull/28788#discussion_r71918442
2016-08-03 20:48:31 -07:00
Kubernetes Submit Queue c2614aee9a Merge pull request #29500 from lixiaobing10051267/masterFound
Automatic merge from submit-queue

Check all places to break the loop when object found

Check all places to break the loop when object found.
2016-08-03 20:05:15 -07:00
lojies 4426c5fd6f add alias for createconfigmap 2016-08-04 10:35:15 +08:00
Kubernetes Submit Queue df8da19055 Merge pull request #29172 from abrarshivani/govmomidepupdate
Automatic merge from submit-queue

VSAN support for VSphere Volume Plugin

This PR does the following,

- Fixes #28625 (VSphere Volume doesn't unmount): modified vmdk namespace path parsing so it accurately handles VMs in folders. See file pkg/volume/vsphere_volume/vsphere_volume.go.
- Updates vmware/govmomi dependency. It was quite behind. The majority of files in the change are in this category.
- Adds support for VSAN datastore. Handle namespace to uuid mapping to assist unmount and detach in VSAN case as well. See file pkg/cloudprovider/providers/vsphere/vsphere.go.

Tested:
    - Created a K8s cluster on VSphere with VSAN datastore. Created a vmdk in VSAN datastore and created pod which uses this vmdk. Before fix (VSphere Volume doesn't unmount) it failed. After fix the volume gets successfully unmounted and detached.
    - Created a K8s cluster on VSphere with VMFS datastore. Created a vmdk in subdirectory of root in VMFS datastore and created pod which uses this vmdk. Before fix (VSphere Volume doesn't unmount) it failed.  After fix the volume gets successfully unmounted and detached.
2016-08-03 19:27:28 -07:00
mfanjie 5fa640490e rewrite serivce controller to apply the latest controller pattern 2016-08-04 09:28:55 +08:00
Kubernetes Submit Queue a2bef42f84 Merge pull request #29036 from ronnielai/image-gc-2
Automatic merge from submit-queue

Consolidating image pulling logic

Moving image puller logic into image manager by consolidating 2 pullers into one implementation.
2016-08-03 17:39:06 -07:00
Manuel de Brito Fontes 60f4fbf4f2 Allow leading * in ingress hostname 2016-08-03 20:16:58 -04:00
Janet Kuo 2d1490a024 Fix the map concurrent read/write issue in deployment controller 2016-08-03 16:51:53 -07:00
Kubernetes Submit Queue a898438448 Merge pull request #30032 from yujuhong/rename_method
Automatic merge from submit-queue

CRI: rename DeletePodSandbox to RemovePodSandbox
2016-08-03 16:47:42 -07:00
Kubernetes Submit Queue 15946ddd76 Merge pull request #29611 from ping035627/ping035627-patch-0726
Automatic merge from submit-queue

add DefaultServiceNodePortRange const

The PR add DefaultServiceNodePortRange const in server_run_options.go, and use it in genericapiserver.go and server_run_options.go.
2016-08-03 16:47:38 -07:00
Chao Xu 4c7514be13 convert README.md to doc.go 2016-08-03 16:38:29 -07:00
Abrar Shivani 87e7535e94 - Updated vmware/govmomi godep (Needs for vsan support)
- Fix unmount for vsanDatastore
- Add support for vsan datastore
2016-08-03 16:37:56 -07:00
Chao Xu 96c84303bd fix kubectl rolling-update when GC is enabled 2016-08-03 15:57:03 -07:00
Ron Lai 8bc4444f16 Delete containers when pod is deleted 2016-08-03 15:56:04 -07:00
Yu-Ju Hong 5c06d7e620 CRI: rename DeletePodSandbox to RemovePodSandbox
This makes it consistent with other calls (e.g., RemoveContainer, RemoveImage).
2016-08-03 15:46:34 -07:00
Andrey Kurilin dfa18ceb5f Fix various typos in apiserver pkg 2016-08-04 01:15:15 +03:00
bindata-mockuser 832363442d Remove kubelet dependency on uname 2016-08-03 17:46:02 -04:00
pweil- f51c1301f2 add asserts for RecognizingDecoder and update protobuf serializer to implement interface 2016-08-03 17:26:31 -04:00
Kubernetes Submit Queue 7c326672c1 Merge pull request #29881 from dagnello/vsphere-volume-limit-bug
Automatic merge from submit-queue

Addresses vSphere Volume Attach limits

This PR resolves bug #29878.
2016-08-03 14:24:31 -07:00
Kubernetes Submit Queue 207e8836c0 Merge pull request #29921 from andreykurilin/kubectl_typos
Automatic merge from submit-queue

Fix various typos in kubectl
2016-08-03 13:43:32 -07:00
Kubernetes Submit Queue 67c7401fd8 Merge pull request #26688 from asalkeld/more-unittests-util-env
Automatic merge from submit-queue

Increase the unit test coverage in pkg/util

These are easy to test, so lets increase coverage.
2016-08-03 13:43:28 -07:00
juanvallejo d9dedfff5e add timeout units to cmds help example 2016-08-03 16:36:51 -04:00
Hongchao Deng fc47f08183 make reousrce prefix consistent with other registries 2016-08-03 13:31:56 -07:00
Ron Lai 321c289792 Consolidating imaging pulling logic 2016-08-03 10:48:50 -07:00
Kubernetes Submit Queue 804109d349 Merge pull request #29950 from andreykurilin/kubelet_typos
Automatic merge from submit-queue

Fix various typos in kubelet
2016-08-03 10:05:46 -07:00
Kubernetes Submit Queue 73deb72399 Merge pull request #29824 from feiskyer/kuberuntime
Automatic merge from submit-queue

Kubelet: add kubeGenericRuntimeManager for new runtime API

Part of #28789. Add `kubeGenericRuntimeManager` for kubelet new runtime API #17048. 

Note that:

- To facilitate code reviewing, #28396 is splited into a few small PRs. This is the first part.
- This PR also fixes some syntax errors in `api.proto`.
- This PR is depending on #29811 (already merged).

CC @yujuhong @Random-Liu @kubernetes/sig-node
2016-08-03 10:05:42 -07:00
Maciej Szulik b5c68a9015 ScheduledJob kubectl changes 2016-08-03 17:25:37 +02:00
Maciej Szulik e6c327048e Forced using batch/v2alpha1 for storing ScheduledJob 2016-08-03 17:25:37 +02:00
Maciej Szulik f0b8edaccc ScheduledJob storage leftovers 2016-08-03 17:25:35 +02:00
deads2k d50506345c fix String protobuf generator 2016-08-03 08:37:45 -04:00
deads2k 60dd4a5d26 interesting changes to add tokenreviews endpoint to implement webhook 2016-08-03 08:37:45 -04:00
deads2k eb79e2c859 generated code changes 2016-08-03 08:37:45 -04:00