Commit Graph

13256 Commits (ec6181d5d3cae2238d485ee75332ab9c09b619d9)

Author SHA1 Message Date
k8s-merge-robot 90f47644f6 Merge pull request #28012 from sttts/sttts-kubectl-attach-err-non-existing-ctr
Automatic merge from submit-queue

kubectl attach: error out for non-existing containers

Currently, kubectl attach falls back to the first container which is pretty confusing.

Based on https://github.com/kubernetes/kubernetes/pull/27541.
2016-06-29 10:11:03 -07:00
Andrey Kurilin 21b218ce4f Add link to diagram of `kubectl drain`
issue kubernetes/kubernetes.github.io#501
2016-06-29 19:10:01 +03:00
k8s-merge-robot 084b598f4d Merge pull request #25876 from dshulyak/patch_change
Automatic merge from submit-queue

Use strategic patch to replace changeCause in patch command

This is partial rework of 11da9a7638
StrategicPatch will be used to update changeCause but failure wont affect command result

fixes: #24858
2016-06-29 08:34:50 -07:00
k8s-merge-robot d30fd0cb0c Merge pull request #28114 from timothysc/http_default_enable
Automatic merge from submit-queue

Enable HTTP2 by default

Update to enable HTTP2 by default, with the option to disable.  

This is a continuation of #25280 for the 1.4 release.  This should provide ample time for vetting. 

/cc @krousey
2016-06-29 07:27:42 -07:00
k8s-merge-robot 7f3da674f7 Merge pull request #26680 from olegshaldybin/fake-clientset-registry
Automatic merge from submit-queue

Track object modifications in fake clientset

Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-29 06:04:33 -07:00
Dmitry Shulyak d81f7a0f22 Use strategic patch to replace changeCause in patch command 2016-06-29 15:20:38 +03:00
joe2far 25b4341dc7 Make kubectl help strings consistent 2016-06-29 12:50:24 +01:00
Michail Kargakis 2451df4e6c kubectl: simplify Rollbacker interface 2016-06-29 13:30:00 +02:00
k8s-merge-robot de0c033570 Merge pull request #27358 from lukaszo/restarts
Automatic merge from submit-queue

Show restart count for init containers

Coutner is reset for normal containers.
fixes issue: #26892
2016-06-29 03:22:10 -07:00
k8s-merge-robot 1a1a4709b9 Merge pull request #28093 from dubstack/dubstack-refactor-qos2
Automatic merge from submit-queue

[Refactor] Make QoS naming consistent across the codebase

@derekwaynecarr @vishh PTAL. Can one of you please attach a LGTM.
2016-06-29 02:36:22 -07:00
k8s-merge-robot c6fa861688 Merge pull request #28160 from saad-ali/waitForGracefulTerm
Automatic merge from submit-queue

Volume manager must verify containers terminated before deleting for ungracefully terminated pods

A pod is removed from volume manager (triggering unmount) when it is deleted from the kubelet pod manager. Kubelet deletes the pod from pod manager as soon as it receives a delete pod request. As long as the graceful termination period is non-zero, this happens after kubelet has terminated all containers for the pod. However, when graceful termination period for a pod is set to zero, the volume is deleted from pod manager *before* its containers are terminated.

This  can result in volumes getting unmounted from a pod before all containers have exited when graceful termination is set to zero.

This PR prevents that from happening by only deleting a volume from volume manager once it is deleted from the pod manager AND the kubelet containerRuntime status indicates all containers for the pod have exited. Because we do not want to call containerRuntime too frequently, we introduce a delay in the `findAndRemoveDeletedPods()` method to prevent it from executing more frequently than every two seconds.

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

Running test in tight loop to verify fix.
2016-06-29 01:33:31 -07:00
Hongchao Deng 55d3597456 change default value of QPS and burst to constant 2016-06-28 21:45:35 -07:00
Hongchao Deng ca17e4745f docs: client default config of qps and burst 2016-06-28 21:45:35 -07:00
Saad Ali c723d9e5c4 Volume manager verify containers terminated before deleting 2016-06-28 21:38:59 -07:00
k8s-merge-robot 641e359b1c Merge pull request #26193 from girishkalele/servicespec
Automatic merge from submit-queue

Remove comment about empty selectors in the service spec

As discussed, removing the comment about empty selectors in Service specs.
2016-06-28 20:35:06 -07:00
k8s-merge-robot 044de6ef90 Merge pull request #28186 from nikhiljindal/betaAPI
Automatic merge from submit-queue

federation: Upgrading the groupversion to v1beta1

This PR contains 2 commits:
* Removing fields from Cluster API object that we are not using. This includes: Capacity, Allocatable and ClusterMeta.
* Move code and rename groupversion `federation/v1alpha1` to `federation/v1beta1`


cc @kubernetes/sig-cluster-federation
2016-06-28 19:05:00 -07:00
nikhiljindal 88b10b1dc0 Removing unneeded fields from Cluster API object 2016-06-28 17:12:57 -07:00
Girish Kalele 3778ca196e Remove comment about empty selectors 2016-06-28 17:04:24 -07:00
k8s-merge-robot 532491aab6 Merge pull request #28095 from saad-ali/fixRacyVolumesInUse
Automatic merge from submit-queue

Kubelet should mark VolumeInUse before checking if it is Attached

Kubelet should mark VolumeInUse before checking if it is Attached.
Controller should fetch fresh copy of node object before detach instead of relying on node informer cache.

Fixes #27836
2016-06-28 15:59:17 -07:00
saadali e06b32b1ef Mark VolumeInUse before checking if it is Attached
Ensure that kublet marks VolumeInUse before checking if it is Attached.
Also ensures that the attach/detach controller always fetches a fresh
copy of the node object before detach (instead ofKubelet relying on node
informer cache).
2016-06-28 14:05:59 -07:00
k8s-merge-robot 70daa166c2 Merge pull request #23830 from sttts/sttts-bash-completion-override-flags
Automatic merge from submit-queue

Add awareness of more override flags in bash-completion

Add awareness during completion for
- `--kubeconfig`
- `--cluster`
- `--user`
- `--context`
- `--server`

TODO:
- [ ] ~~add completion for the upper flags themselves~~ (out of scope)

<!-- 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/23830)
<!-- Reviewable:end -->
2016-06-28 13:59:13 -07:00
k8s-merge-robot 32eccd413f Merge pull request #25562 from gtank/certificates-api-v9
Automatic merge from submit-queue

TLS bootstrap API group (alpha)

This PR only covers the new types and related client/storage code- the vast majority of the line count is codegen. The implementation differs slightly from the current proposal document based on discussions in design thread (#20439). The controller logic and kubelet support mentioned in the proposal are forthcoming in separate requests.

I submit that #18762 ("Creating a new API group is really hard") is, if anything, understating it. I've tried to structure the commits to illustrate the process.

@mikedanese @erictune @smarterclayton @deads2k

```release-note-experimental
An alpha implementation of the the TLS bootstrap API described in docs/proposals/kubelet-tls-bootstrap.md.
```

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-28 13:25:22 -07:00
k8s-merge-robot 13bb931b60 Merge pull request #26761 from matchstick/dedent
Automatic merge from submit-queue

Dedent

Adding the dedent package and then applying it to the kubectl help commands. Also updating the documentation to reflect the use of dedent.
2016-06-28 12:50:59 -07:00
k8s-merge-robot 7b532f6f03 Merge pull request #28159 from sttts/sttts-seccomp-operator
Automatic merge from submit-queue

Use : as seccomp security option operator for Docker 1.10

Compare https://docs.docker.com/v1.11/engine/reference/run/ and https://docs.docker.com/v1.10/engine/reference/run/

Fixes https://github.com/kubernetes/kubernetes/issues/28107
2016-06-28 12:15:43 -07:00
Dr. Stefan Schimanski 0acca44dc1 Error out on non-existing container in kubectl attach 2016-06-28 21:11:29 +02:00
George Tankersley c9c6fff269 codegen: GENERATE ALL THE THINGS 2016-06-28 12:05:41 -07:00
George Tankersley f8f7e7e3c7 codegen: add certificates group to generators 2016-06-28 12:05:41 -07:00
George Tankersley 34506faf97 kubectl: add certificates group 2016-06-28 12:05:40 -07:00
George Tankersley 56a2cf40e6 tests: add certificates to existing test infrastructure 2016-06-28 12:05:40 -07:00
Dr. Stefan Schimanski e78d7749a5 Add awareness of more override flags in bash-completion 2016-06-28 20:56:36 +02:00
Oleg Shaldybin a58b4cf59d Don't panic in NodeController if pod update fails
Previously it was trying to use a nil pod variable if error was returned
from the pod update call.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin ab6ac7c94e Fix mirror pod identity change test
If mirror pod identity changes it actually doesn't get updated;
previously test was relying on an incorrect record pulled from a fake
clientset.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin 1f48cd27e7 Expect namespace deletion in NamespaceController
Using new fake clientset registry exposes the actual flow on pending
namespace finalization: get namespace, create finalizer, list pods and
delete namespace if there are no pods.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin aff173f7d1 Fix expectations in deployment controller test
Since fake clientset now correctly tracks objects created by deployment
controller, it triggers different controller behavior: controller only
creates replica set once and updates deployment once.
2016-06-28 11:54:13 -07:00
Oleg Shaldybin 3b15d5be19 Use correct namespace in unit tests that use fake clientset
Fake clientset no longer needs to be prepopulated with records: keeping
them in leads to the name conflict on creates. Also, since fake
clientset now respects namespaces, we need to correctly populate them.
2016-06-28 11:26:34 -07:00
Oleg Shaldybin d445d4082d Regenerate clientsets 2016-06-28 10:59:54 -07:00
Oleg Shaldybin 10e75946a2 Track object modifications in fake clientset
Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-28 10:59:54 -07:00
k8s-merge-robot bf54cd40f3 Merge pull request #27513 from hpcloud/hpe/vsphere-vm-dir
Automatic merge from submit-queue

vSphere provider - Adding config for working dir

This allows the user the set "working-dir" in their vsphere.cfg file.
The value should be a path in the vSphere datastore in which the
provider will look for vms.  This should help compartmentalize 
workloads in vSphere.
2016-06-28 10:29:58 -07:00
k8s-merge-robot 8c5be726d8 Merge pull request #28147 from jsafrane/clone-error-checks
Automatic merge from submit-queue

Fix error checks after cloning.

We should not use clone result When cloning fails. Fixes issues found in #28108.
2016-06-28 10:29:53 -07:00
k8s-merge-robot eb4b402d2e Merge pull request #28025 from ncdc/refactor-master-bootstrap-controller
Automatic merge from submit-queue

Add EndpointReconcilerConfig to master Config

Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler and reconciliation interval when starting a customized master

@kubernetes/sig-api-machinery @deads2k @smarterclayton @liggitt @kubernetes/rh-cluster-infra
2016-06-28 08:07:41 -07:00
Dr. Stefan Schimanski 186c6b29c1 Use : as seccomp security option operator for Docker 1.10 2016-06-28 16:44:48 +02:00
deads2k 3ad54d1812 add lastsyncresourceversion to sharedinformer 2016-06-28 07:42:15 -04:00
Jan Safranek 06082b1bdf Fixed goroutinemap race on Wait()
sync.WaitGroup produces data races when a GoroutineMap is empty and Wait() and
Run() are called at the same time.

From sync.WaitGroup:
   Note that calls with a positive delta that occur when the counter is zero
   must happen before a Wait.

Fixes #28128
2016-06-28 12:04:45 +02:00
Jan Safranek d78946240e Fix error checks after cloning.
We should not use clone result When cloning fails. Fixes issues found in #28108.
2016-06-28 10:01:52 +02:00
k8s-merge-robot d5e60cefc4 Merge pull request #27258 from smarterclayton/optional_slices
Automatic merge from submit-queue

Add optional slice and map support to protobuf generation

See the last commit message for a description.

Fixes #25835
2016-06-28 00:29:36 -07:00
k8s-merge-robot d689a1f58b Merge pull request #27122 from lukaszo/uxlogs
Automatic merge from submit-queue

Include init containers in error messages
2016-06-27 23:14:36 -07:00
k8s-merge-robot 31804fb971 Merge pull request #26857 from rajdeepd/client_test
Automatic merge from submit-queue

Test cases for Rest Client
2016-06-27 22:06:40 -07:00
Clayton Coleman 1c8b928908
Handle aliases correctly in deepcopy/conversion 2016-06-27 21:42:02 -07:00
Clayton Coleman 82a9bed565
Copy reflect diff 2016-06-27 21:41:58 -07:00
k8s-merge-robot e32b871637 Merge pull request #26771 from kargakis/use-pod-namespacer
Automatic merge from submit-queue

kubectl: fix sort logic for logs

@kubernetes/kubectl
2016-06-27 21:33:59 -07:00
xiangpengzhao 716fb5ed7d Should set default value for --service-node-port-range flag before vefirying 2016-06-27 22:48:49 -04:00
k8s-merge-robot 3e5cdd796c Merge pull request #23858 from liggitt/satoken-queue
Automatic merge from submit-queue

Convert service account token controller to use a work queue

Converts the service account token controller to use a work queue. This allows parallelization of token generation (useful when there are several simultaneous namespaces or service accounts being created). It also lets us requeue failures to be retried sooned than the next sync period (which can be very long).

Fixes an issue seen when a namespace is created with secrets quotaed, and the token controller tries to create a token secret prior to the quota status having been initialized. In that case, the secret is rejected at admission, and the token controller wasn't retrying until the resync period.
2016-06-27 16:43:14 -07:00
k8s-merge-robot 11e41581b4 Merge pull request #27944 from wongma7/pvc-selector-hack
Automatic merge from submit-queue

Fix pvc label selector validation error

This is for https://github.com/kubernetes/kubernetes/issues/26866. Other selectors are e.g. v1beta1.x , the pvc one is unversioned.x
2016-06-27 16:02:40 -07:00
George Tankersley b084d202bb client/unversioned: add certificates client 2016-06-27 14:29:16 -07:00
George Tankersley 0439b694ca apiserver: enable certificates api 2016-06-27 14:29:16 -07:00
George Tankersley 2802f55c18 pkg/registry: add certificate storage 2016-06-27 14:29:16 -07:00
George Tankersley f7f3e0f9e9 apis/certificates: initialize the certificates API group 2016-06-27 14:29:16 -07:00
k8s-merge-robot be682148fb Merge pull request #28108 from jsafrane/fix-cache-init
Automatic merge from submit-queue

Fix initialization of volume controller caches.

Fix `PersistentVolumeController.initializeCaches()` to pass pointers to volume or claim to  `storeObjectUpdate()` and add extra functions to enforce that the right types are checked in the future.

Fixes #28076
2016-06-27 14:18:51 -07:00
Matthew Wong 3118c937be Fix pvc label selector validation error 2016-06-27 16:00:03 -04:00
dkalleg 49436012ba vSphere provider - Adding config for working dir
This allows the user the set "working-dir" in their vsphere.cfg file.
The value should be a path in the vSphere datastore in which the
provider will look for vms.
2016-06-27 11:45:39 -07:00
derekwaynecarr a04e6f8635 Add additional testing scenarios for compute resource requests=0 2016-06-27 14:38:55 -04:00
Xiang Li 880432ca71 daemon/controller.go: minor code cleanup 2016-06-27 10:43:06 -07:00
Xiang Li 053d971853 daemon/controller.go: remove unused func enqueueAllDaemonSets 2016-06-27 10:40:37 -07:00
k8s-merge-robot 653bce30ee Merge pull request #27939 from xiangpengzhao/fix_port_zero
Automatic merge from submit-queue

Should verify --secure-port and --insecure-port when starting kube-apiserver

When starting kube-apiserver, if we pass the flag `--secure-port` or `--insecure-port` with an invalid value (i.e. < 1 or > 65535), though there is an error message, the apiserver still runs normally. Actually, it should exit (as when not passing the flag `--etcd-servers` does), or else it's meaningless.

This fix is similar to #27762.

Maybe there is still other flags which have to be verified, if found, I will try to fix them.

Before fix:
```
root@vm:/home/paas/zxp/log/kube# kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --secure-port=-1 &
[1] 1500
root@vm:/home/paas/zxp/log/kube# E0623 04:14:15.378332    1500 controller.go:97] Unable to perform initial Kubernetes service initialization: Endpoints "kubernetes" is invalid: [subsets[0].ports[0].port: Invalid value: -1: must be between 1 and 65535, inclusive, subsets[0].ports[0].port: Invalid value: -1: must be between 1 and 65535, inclusive]
[restful] 2016/06/23 04:14:15 log.go:30: [restful/swagger] listing is available at https://172.16.1.11:-1/swaggerapi/
[restful] 2016/06/23 04:14:15 log.go:30: [restful/swagger] https://172.16.1.11:-1/swaggerui/ is mapped to folder /swagger-ui/
E0623 04:14:15.422742    1500 genericapiserver.go:730] Unable to listen for secure (listen tcp: invalid port -1); will try again.

root@vm:/home/paas/zxp/log/kube# 
root@vm:/home/paas/zxp/log/kube# E0623 04:14:30.425211    1500 genericapiserver.go:730] Unable to listen for secure (listen tcp: invalid port -1); will try again.

root@vm:/home/paas/zxp/log/kube# ps -ef|grep kube
root      1500 13507  1 04:14 pts/1    00:00:00 kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --secure-port=-1
```

After:
```
root@vm:/home/paas/zxp/log/kube# kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --insecure-port=-1 &
[1] 10570
root@vm:/home/paas/zxp/log/kube# F0623 05:37:16.124206   10570 genericapiserver.go:594] --insecure-port -1 must be between 1 and 65535, inclusive
goroutine 1 [running]:
k8s.io/kubernetes/vendor/github.com/golang/glog.stacks(0x4418400, 0x0, 0x0, 0x0)
	/home/paas/zxp/code/k8s/train_test/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(0x43f7f60, 0xc800000003, 0xc8200e4600, 0x42b2d5a, 0x13, 0x252, 0x0)
	/home/paas/zxp/code/k8s/train_test/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(0x43f7f60, 0xc800000003, 0x32278a0, 0x39, 0xc82037ac90, 0x1, 0x1)
	/home/paas/zxp/code/k8s/train_test/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(0x32278a0, 0x39, 0xc82037ac90, 0x1, 0x1)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/golang/glog/glog.go:1145 +0x5d
k8s.io/kubernetes/pkg/genericapiserver.verifyInsecurePort(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:594 +0x103
k8s.io/kubernetes/pkg/genericapiserver.ValidateRunOptions(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:603 +0x59
k8s.io/kubernetes/pkg/genericapiserver.DefaultAndValidateRunOptions(0xc820199800)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/genericapiserver/genericapiserver.go:607 +0x4e
k8s.io/kubernetes/cmd/kube-apiserver/app.Run(0xc820468b40, 0x0, 0x0)
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:83 +0x344
main.main()
	/home/paas/zxp/code/k8s/train_test/kubernetes/_output/local/go/src/k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go:50 +0x121

[1]+  Exit 255                kube-apiserver --etcd-servers=http://172.16.1.11:4001 --service-cluster-ip-range=192.168.122.0/24 --insecure-bind-address=0.0.0.0 --logtostderr=false --log-dir=/home/paas/zxp/log/kube --v=10 --insecure-port=-1
root@vm:/home/paas/zxp/log/kube# 
```
2016-06-27 10:20:31 -07:00
Jordan Liggitt f45d9dc2f8 Convert service account token controller to use a work queue 2016-06-27 13:01:24 -04:00
k8s-merge-robot db4c943f6d Merge pull request #27800 from derekwaynecarr/fix_filename_typo
Automatic merge from submit-queue

Fix typo in filename

just a simple fix
2016-06-27 09:49:16 -07:00
Jordan Liggitt c202a405cd Fix reference to linux-only struct 2016-06-27 11:13:49 -04:00
Timothy St. Clair efe25553cd Follow on for 1.4 to default HTTP2 on by default 2016-06-27 09:36:41 -05:00
Andy Goldstein b55cede866 Add EndpointReconcilerConfig to master Config
Add EndpointReconcilerConfig to master Config to allow downstream integrators to customize the reconciler
and reconciliation interval when starting a customized master.
2016-06-27 09:22:30 -04:00
Jan Safranek 169076e7da Fix initialization of volume controller caches.
Fix PersistentVolumeController.initializeCaches() to pass pointers to volume
or claim to storeObjectUpdate() and add extra functions to enforce that the
right types are checked in the future.


Fixes #28076
2016-06-27 13:08:02 +02:00
xiangpengzhao d8a7b4948b Should verify port value when starting kube-apiserver 2016-06-27 06:34:14 -04:00
Michael Rubin 760b04e294 Use dedent for the kubectl commands
The one side effect is that for the "kubectl help" commands a newline
is prepended to output, which will alter the yaml output.

Here we use dedent to format the code to match the output.

hack/update-generated-docs.sh has been run and the affected files have
been added.

Note: for describe.go we added a period to the end of an output message.
2016-06-26 22:51:14 -07:00
k8s-merge-robot ecfd4aa131 Merge pull request #27755 from dubstack/dubstack-cgroup-interface
Automatic merge from submit-queue

Add support for basic QoS and pod level cgroup management

This PR is a WIP and is tied to this upstream issue #27204 
It adds support for creation,deletion and updates of cgroups in Kubernetes.
@vishh PTAL

Please note that the first commit is part of this PR: #27749
cc @kubernetes/sig-node

Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 22:21:15 -07:00
k8s-merge-robot b4db89c457 Merge pull request #27644 from enj/dev/enj/issues/9307
Automatic merge from submit-queue

Use preferred group version when discovery fails due to 403

```
kubectl get pods --as bob
```
Returns:
```
error: failed to negotiate an api version; server supports: map[], client supports: map[autoscaling/v1:{} rbac.authorization.k8s.io/v1alpha1:{} federation/v1alpha1:{} batch/v1:{} v1:{} authentication.k8s.io/v1beta1:{} apps/v1alpha1:{} componentconfig/v1alpha1:{} authorization.k8s.io/v1beta1:{} batch/v2alpha1:{} extensions/v1beta1:{} policy/v1alpha1:{}]
```
It should return:
```
User "deads" cannot "impersonate" "users" with name "bob" in project ""
```

`serverVersions` is empty when discovery fails, thus we fallback to the `preferredGV`.

See openshift/origin#9307 and [openshift/origin/pull/9389](https://github.com/openshift/origin/pull/9389) for further details.
2016-06-26 21:11:12 -07:00
k8s-merge-robot d744fd411f Merge pull request #27598 from xiangpengzhao/optimize_canRunPod
Automatic merge from submit-queue

Refactor func canRunPod

After refactoring, we only need to check `if pod.Spec.SecurityContext == nil` once. The logic is a bit clearer.
2016-06-26 19:41:09 -07:00
Buddha Prakash 4acb64f8bd Make Qos naming consistent across the codebase 2016-06-26 16:19:47 -07:00
Buddha Prakash a5ead79d43 Add support for basic cgroup management 2016-06-26 15:41:34 -07:00
k8s-merge-robot 11c5d22004 Merge pull request #27750 from dims/fix-issue-27730
Automatic merge from submit-queue

Fix pkg/kubelet unit tests fail on OSX

use runtime.GOOS for the OperatingSystem and not hardcode it to linux.

Fixes #27730
2016-06-26 06:56:37 -07:00
k8s-merge-robot d64333419c Merge pull request #27749 from dubstack/dubstack-refactor-qos
Automatic merge from submit-queue

[Refactor] QOS to have QOS Class type for QoS classes

This PR adds a QOSClass type and initializes QOSclass constants for the three QoS classes.
It would be good to use this in all future QOS related features. 
This would be good to have for the (Pod level cgroups isolation proposal)[https://github.com/kubernetes/kubernetes/pull/26751] that i am working on aswell.
@vishh PTAL
 
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 06:23:23 -07:00
k8s-merge-robot 7fbf4ac625 Merge pull request #27541 from gitfred/attach-init-con
Automatic merge from submit-queue

Fix attach command for InitContainers

Added InitContainers to the things that GetContainer in attach.go has to look for to find a container to attach. Also test case added.

fixes #27540
2016-06-26 00:04:49 -07:00
k8s-merge-robot a43aa608a1 Merge pull request #27508 from aaronlevy/dapi-hostip
Automatic merge from submit-queue

Kubelet can retrieve host IP even when apiserver has not been contacted

fixes https://github.com/kubernetes/kubernetes/issues/26590, fixes https://github.com/kubernetes/kubernetes/issues/6558

Right now the kubelet expects to get the hostIP from the kubelet's local nodeInfo cache. However, this will be empty if there is no api-server (or the apiServer has not yet been contacted).

In the case of static pods, this change means the downward api can now be used to populate hostIP.
2016-06-25 23:29:05 -07:00
k8s-merge-robot a6f6a74a9d Merge pull request #27359 from sttts/sttts-kubectl-exec-not-running
Automatic merge from submit-queue

Add not-running check to kubectl-exec

Different cases:
- pod is started, container terminated: 
```
error: error executing remote command: error executing command in container: container not found ("sleep1")
```
- pod has terminated:
```
error: cannot exec into a container in a completed pod; current phase is Succeeded
```
- container does not exist in pod spec:
```
Error from server: container foo is not valid for pod multi-container
```

Fixes https://github.com/openshift/origin/issues/8472#event-681794952
2016-06-25 21:31:03 -07:00
k8s-merge-robot 56db230455 Merge pull request #27331 from hpcloud/hpe/vsphere-get-id
Automatic merge from submit-queue

vSphere provider - Getting node data by ip instead of uuid

To get the uuid we need the service to be running as root. This change
allows us to run the controller-manager and api server as non-root.
2016-06-25 20:57:50 -07:00
k8s-merge-robot ea1248e9f2 Merge pull request #27300 from euank/remove-dead-stack-get
Automatic merge from submit-queue

kubelt: Remove a couple lines of dead code

Presumably that code was added for debugging reasons and never removed. Hopefully.

If it's actually important and there's a good reason to do what looks like a no-op to get pause-the-world behaviour or whatever, I'd hope there'd be a comment.

cc @pwittrock
2016-06-25 20:23:38 -07:00
k8s-merge-robot 93037844c1 Merge pull request #27293 from caesarxuchao/add-patch-to-clientset
Automatic merge from submit-queue

[client-gen]Add Patch to clientset

* add the Patch() method to the clientset. 
* I have to rename the existing Patch() method of `Event` to PatchWithEventNamespace() to avoid overriding.
* some minor changes to the fake Patch action.

cc @Random-Liu since he asked for the method
@kubernetes/sig-api-machinery 

ref #26580 

```release-note
Add the Patch method to the generated clientset.
```
2016-06-25 19:15:11 -07:00
k8s-merge-robot 84c8158b2a Merge pull request #27263 from sttts/sttts-kubectl-attach-cmdName
Automatic merge from submit-queue

Dynamically derive AttachOptions.CommandName

This PR sets AttachOptions.CommandName dynamically depending on the corba Command
hierarchy. If the root command is named e.g. "oc" (for the OpenShift cli) this
will result in "oc attach" instead of the static "kubectl attach" before this
patch.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1341450
2016-06-25 18:40:56 -07:00
k8s-merge-robot cbab337b99 Merge pull request #27242 from smarterclayton/discovery_prefix
Automatic merge from submit-queue

Make discovery client parameterizable to legacy prefix
2016-06-25 17:26:05 -07:00
k8s-merge-robot 1effc5af91 Merge pull request #28002 from asalkeld/init-cache-error
Automatic merge from submit-queue

Fix startup type error in initializeCaches

The following error was getting logged:
PersistentVolumeController can't initialize caches, expected list of volumes, got:
&{TypeMeta:{Kind: APIVersion:} ListMeta:{SelfLink:/api/v1/persistentvolumes ResourceVersion:11} Items:[]}

The tests make extensive use of NewFakeControllerSource which uses api.List
instead of api.PersistentVolumeList. So use reflect to help iterate over the
items then assert the item type.

fixes #27757
2016-06-25 14:13:15 -07:00
k8s-merge-robot 59b88d7ab6 Merge pull request #26925 from ZTE-PaaS/249043822-patch-1
Automatic merge from submit-queue

optimize deleteFromIndices method of thread_safe_store

As all methods of thread_safe_store are threadsafe, so i think, in deleteFromIndices method, if the index is nil, need not run the for structure below
2016-06-25 12:57:50 -07:00
k8s-merge-robot 601173c2fe Merge pull request #26916 from caesarxuchao/podgc
Automatic merge from submit-queue

rename the gc for terminated pods to "podgc"

to avoid name collision with the [generic garbage collector](https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/garbagecollector/garbagecollector.go)
2016-06-25 12:24:07 -07:00
k8s-merge-robot d1407ecdd3 Merge pull request #26867 from xiang90/daemon
Automatic merge from submit-queue

daemon/controller.go: refactor worker

1. function name is better to be verb or verb+noun

2. remove unnecessary func call
2016-06-25 11:43:49 -07:00
k8s-merge-robot 00b5b548d6 Merge pull request #26854 from xiang90/cacher
Automatic merge from submit-queue

cacher.go: remove NewCacher func

NewCacher is a wrapper of NewCacherFromConfig. NewCacher understands
how to create a key func from scopeStrategy. However, it is not the
responsibility of cacher. So we should remove this function, and
construct the config in its caller, which should understand scopeStrategy.
2016-06-25 11:10:06 -07:00
k8s-merge-robot 951b591716 Merge pull request #26722 from deads2k/local-patch
Automatic merge from submit-queue

let patch use --local flag like `kubectl set image`

Adds the concept of a `--local` flag to `kubectl patch`.  This flag is similar to `kubectl set image -f --local` because it will use the content of the file as the input to the patch operation instead of using the file content to file resource/name tuples.  

This pull lets you run something like `kubectl create deployment --dry-run -o yaml | kubectl set volume --local -f - -o yaml | kubectl patch --local -f - --patch {} | kubectl create -f -`

As proof that it works, you can run against a local file just to mess around with it, but `--local -f -` is the most likely case.
```
$kubectl patch --local -f pkg/api/validation/testdata/v1/validPod.yaml --patch='{"spec": {"restartPolicy":"Never"}}'
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    name: redis-master
  name: name
spec:
  containers:
  - args:
    - this
    - is
    - an
    - ok
    - command
    image: gcr.io/fake_project/fake_image:fake_tag
    name: master
    resources: {}
  restartPolicy: Never
status: {}
```

This is useful for setting rarely used, but immutable fields from `kubectl create` or `kubectl convert` without dropping to an interactive editor.

Some discussion here: https://github.com/kubernetes/kubernetes/issues/21648#issuecomment-218579977

@smarterclayton @kubernetes/kubectl 
 @eparis @soltysh @stevekuznetsov we've talked about this separately
2016-06-25 10:00:41 -07:00
k8s-merge-robot 81c8fe37e6 Merge pull request #26598 from janetkuo/3rd-party-error-logs
Automatic merge from submit-queue

Add more information when throwing errors in discoverying 3rd party resources

#26425


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-25 09:25:58 -07:00
k8s-merge-robot 99951007ff Merge pull request #26539 from ripcurld00d/fix_json_template_url
Automatic merge from submit-queue

Update the jsonpath template URL

It seems like http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md redirects to http://kubernetes.io/docs/user-guide/jsonpath/.

Therefore, updating to the new URL where is required.

Relate to https://github.com/openshift/origin/pull/9013
2016-06-25 08:17:31 -07:00
k8s-merge-robot 464eff2bf2 Merge pull request #26504 from nowprovision/patch-1
Automatic merge from submit-queue

Fix error handling in endpoint controller
2016-06-25 07:43:49 -07:00
k8s-merge-robot b71e499c92 Merge pull request #26502 from gyuho/remove_name_field
Automatic merge from submit-queue

pkg/storage/etcd3: remove name field in test

Current test gets the name with its test table index,
so there seems to be no reason to have name field in test table.
2016-06-25 07:09:36 -07:00
k8s-merge-robot b51e5c0127 Merge pull request #26276 from deads2k/tweak-quota-validation
Automatic merge from submit-queue

make quota validation re-useable

Break quota validation into smaller functions to allow for object re-use.

@derekwaynecarr
2016-06-25 05:23:55 -07:00
k8s-merge-robot db62715c65 Merge pull request #26240 from liggitt/wrap-updated-object
Automatic merge from submit-queue

Add WrapUpdatedObjectInfo helper

This makes it easier to attach checks/transformations to the updated object in storage Update functions, while still keeping the data flow intact (so admission, patch, and other injected checks continue to work as intended), without needing to do anything tricky to get the updated object out of the UpdatedObjectInfo introduced in https://github.com/kubernetes/kubernetes/pull/25787

This is especially useful when one storage is delegating to another, but wants its checks to be run in the heart of the eventual GuaranteedUpdate call.
2016-06-25 04:44:40 -07:00
k8s-merge-robot b4c81a073a Merge pull request #25709 from asalkeld/null-deref
Automatic merge from submit-queue

Check for an empty value in validateField

```release-note
* Fix a panic when args was not supplied with any values.
```

reflect.TypeOf() can take a nil (it then returns a nil), but
Kind() panics on a nil.

Now the user gets the following output:
./kubectl.sh --server=http://localhost:8080 create -f ../../test-files/test-rc.yaml
error validating "../../test-files/test-rc.yaml": error validating data: unexpected nil value for field spec.template.spec.containers[0].args[0]; if you choose to ignore these errors, turn validation off with --validate=false

fixes #20627 and fixes #26927
2016-06-25 02:31:01 -07:00
k8s-merge-robot 7c355e18a7 Merge pull request #25085 from metral/recursive-edit
Automatic merge from submit-queue

enable recursive processing in kubectl edit

This PR was split out of https://github.com/kubernetes/kubernetes/pull/23673 per @deads2k's suggestion: https://github.com/kubernetes/kubernetes/pull/23673#discussion_r61291178

It makes use of the recursive processing of a directory in `kubectl edit`
2016-06-24 23:59:54 -07:00
k8s-merge-robot 151c2249cc Merge pull request #28044 from yifan-gu/bump_rkt
Automatic merge from submit-queue

rkt: Bump required rkt version to 1.9.1.

Bump the rkt version to use the one that fixed the [go-systemd sdjournal issue](https://github.com/coreos/rkt/pull/2837), also match [release doc](https://github.com/kubernetes/kubernetes.github.io/blob/release-1.3/docs/getting-started-guides/rkt/index.md#prerequisite).

cc @kubernetes/sig-rktnetes @kubernetes/sig-node
2016-06-24 22:50:29 -07:00
k8s-merge-robot 2d35871569 Merge pull request #24385 from Clarifai/fixes
Automatic merge from submit-queue

golint fixes for AWS cloudprovider

Among other things, golint doesn't like receivers that are inconsistently named or called "self". Or structs named aws.AWSservices, aws.AWSCloud, etc.
2016-06-24 20:58:49 -07:00
k8s-merge-robot fc1937f68f Merge pull request #20273 from kargakis/allow-scaling-paused-deployments
Automatic merge from submit-queue

Proportionally scale paused and rolling deployments

Enable paused and rolling deployments to be proportionally scaled.
Also have cleanup policy work for paused deployments.

Fixes #20853
Fixes #20966
Fixes #20754

@bgrant0607 @janetkuo @ironcladlou @nikhiljindal

<!-- 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/20273)
<!-- Reviewable:end -->
2016-06-24 19:41:51 -07:00
k8s-merge-robot d50bd9e75c Merge pull request #27996 from ronnielai/gc-threshold
Automatic merge from submit-queue

Image GC logic should compensate for reserved blocks

Calculating the disk usage based on available bytes instead of usage bytes to account for reserved blocks in image GC

#27169
2016-06-24 19:08:36 -07:00
k8s-merge-robot f33188a0d0 Merge pull request #28060 from yifan-gu/fix_stage1_anno
Automatic merge from submit-queue

rkt: Fix the 'privileged' check when stage1 annotation is provided.

Previously when stage1 annotation is provided, we only checks if
the kubelet allows privileged, which is not useful as that is a global
setting.

Instead, we should check if the pod has explicitly set the privileged
security context to 'true'.

cc @kubernetes/sig-rktnetes @kubernetes/sig-node
2016-06-24 17:58:07 -07:00
k8s-merge-robot 6f8a0c61c1 Merge pull request #27208 from yujuhong/min_docker_version
Automatic merge from submit-queue

Bump minimum API version for docker to 1.21

The corresponding docker version is 1.9.x. Dropping support for docker 1.8.

/cc @kubernetes/sig-node
2016-06-24 17:24:19 -07:00
Angus Salkeld b4f7e67d25 Fix startup type error in initializeCaches
The following error was getting logged:
PersistentVolumeController can't initialize caches, expected list of volumes, got:
&{TypeMeta:{Kind: APIVersion:} ListMeta:{SelfLink:/api/v1/persistentvolumes ResourceVersion:11} Items:[]}
2016-06-25 10:15:27 +10:00
Yifan Gu 8b1b9120c6 rkt: Fix the 'privileged' check when stage1 annotation is provided.
Previously when stage1 annotation is provided, we only checks if
the kubelet allows privileged, which is not useful as that is a global
setting.

Instead, we should check if the pod has explicitly set the privileged
security context to 'true'.
2016-06-24 16:33:12 -07:00
Buddha Prakash c3551ae6cd Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-24 15:36:04 -07:00
k8s-merge-robot 07d24e4557 Merge pull request #28004 from mikedanese/fix-nil
Automatic merge from submit-queue

return nil from NewClientConfig instead of empty struct

This is a go convention and fixes an nil pointer in kubelet when passing in bad command line options:

```
I0624 04:12:33.333246   25404 plugins.go:141] Loaded network plugin "kubenet"
E0624 04:12:33.333390   25404 runtime.go:58] Recovered from 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:52
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/runtime/runtime.go:40
/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/client/clientset_generated/internalclientset/typed/core/unversioned/service.go:132
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/kubelet.go:254
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/listwatch.go:80
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:262
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/client/cache/reflector.go:204
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:86
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:87
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/util/wait/wait.go:49
```
cc @caesarxuchao @lavalamp
2016-06-24 15:15:08 -07:00
k8s-merge-robot cd422ada25 Merge pull request #28034 from krousey/kubeconfig_filelock
Automatic merge from submit-queue

Adding lock files for kubeconfig updating

This is to prevent concurrent executions from corrupting the kubeconfig file. 

Also, release note?

#23964
2016-06-24 14:37:50 -07:00
Rudi Chiarito 8db551f674 golint fixes for aws cloudprovider 2016-06-24 17:06:38 -04:00
k8s-merge-robot 8509b35cf2 Merge pull request #27637 from hongchaodeng/rc-clean
Automatic merge from submit-queue

RC: rename wait -> wg

We already have a package called "wait". We should differentiate the name.

/cc @caesarxuchao
2016-06-24 13:57:13 -07:00
k8s-merge-robot ce0227bb8b Merge pull request #27402 from pwittrock/owners
Automatic merge from submit-queue

Remove bgrant from owners since he has plenty to do.

@bgrant0607 FYI

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-24 13:56:59 -07:00
k8s-merge-robot e65965fca6 Merge pull request #26855 from xiang90/cacher_rm
Automatic merge from submit-queue

cacher: remove unnecessary initialzation
2016-06-24 13:56:47 -07:00
k8s-merge-robot 6dff5d24d1 Merge pull request #25769 from deads2k/remove-dead-discovery-code
Automatic merge from submit-queue

remove confusing, dead code from master.go

Found while chasing something else, looks completely dead.
2016-06-24 13:56:31 -07:00
k8s-merge-robot c4aa7ee0b2 Merge pull request #25024 from xiangpengzhao/fix_typos
Automatic merge from submit-queue

Fix typos in docker.go

Fix minor typos in variable name
2016-06-24 13:56:22 -07:00
Yifan Gu 30c913e211 rkt: Bump required rkt version to 1.9.1. 2016-06-24 13:54:32 -07:00
Kris 88e2a31978 Adding lock files for kubeconfig updating 2016-06-24 13:11:52 -07:00
Davanum Srinivas 8beed4cd8d
Fix pkg/kubelet unit tests fail on OSX
Fixes #27730
2016-06-24 15:58:09 -04:00
Sylwester Brzeczkowski a558cadedd Fix attach command for InitContainers 2016-06-24 14:35:02 +02:00
k8s-merge-robot bc1c1c1360 Merge pull request #27972 from mml/fed-backend2
Automatic merge from submit-queue

A few changes to federated-service e2e test.

Most of the changes that get the test to pass have been made already or
elsewhere.  Here we restructure a bit fixing a nesting problem, extend the
timeouts, and start creating distinct backend pods that I'll delete in the
non-local test (coming shortly).

Also some extra debugging info in the DNS code.  I made some upstream
changes to skydns in https://github.com/skynetservices/skydns/pull/283

For #27739

Includes a commit from @madhusudancs that I will remove once his merges.
2016-06-23 22:48:08 -07:00
Mike Danese 3162197c23 autogenerated 2016-06-23 22:15:03 -07:00
Ron Lai 038b8797c4 Calculating the disk usage based on available bytes instead of usage bytes to account for reserved blocks in image GC 2016-06-23 21:41:33 -07:00
k8s-merge-robot a27fd4b01e Merge pull request #27708 from nikhiljindal/dnsHealthCheck
Automatic merge from submit-queue

federation: Updating KubeDNS to try finding a local service first for federation query

Ref https://github.com/kubernetes/kubernetes/issues/26762

Updating KubeDNS to try to find a local service first for federation query.
Without this change, KubeDNS always returns the DNS hostname, even if a local service exists.

Have updated the code to first remove federation name from path if it exists, so that the default search for local service happens. If we dont find a local service, then we try to find the DNS hostname.

Will appreciate a strong review since this is my first change to KubeDNS.
https://github.com/kubernetes/kubernetes/pull/25727 was the original PR that added federation support to KubeDNS.

cc @kubernetes/sig-cluster-federation @quinton-hoole @madhusudancs @bprashanth @mml
2016-06-23 20:30:58 -07:00
k8s-merge-robot 8ed6c8eeb8 Merge pull request #27914 from yifan-gu/fix_kubenet_hostport
Automatic merge from submit-queue

kubenet: Fix host port for rktnetes.

Because rkt pod runs after plugin.SetUpPod() is called, so
getRunningPods() does not return the newly created pod, which
causes the hostport iptable rules to be missing for this new pod.

cc @dcbw @freehan 

A follow up fix for https://github.com/kubernetes/kubernetes/pull/27878#issuecomment-227898936
2016-06-23 18:48:45 -07:00
nikhiljindal 61f43c5924 Updating KubeDNS to try a local service first for federation query 2016-06-23 17:50:12 -07:00
Matt Liggett e2021ef241 A few changes to federated-service e2e test.
Most of the changes that get the test to pass have been made already or
elsewhere.  Here we restructure a bit fixing a nesting problem, extend
the timeouts, and start creating distinct backend pods that I'll delete
in the non-local test (coming shortly).

Also some extra debugging info in the DNS code.  I made some upstream
changes to skydns in https://github.com/skynetservices/skydns/pull/283
2016-06-23 17:40:54 -07:00
Vishnu kannan fc3101f515 remove reference to documentation webpage from kubectl describe nodes output
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-23 16:28:01 -07:00
k8s-merge-robot 38182e91c9 Merge pull request #27960 from madhusudancs/fed-kube-dns-append-region
Automatic merge from submit-queue

Append both the zone and the region to the federation query responses, not just the zone.

This PR is based on @mml's #27896. I will rebase once that PR is merged.


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-23 14:13:31 -07:00
Yifan Gu 9140ce07bc kubenet: Fix host port for rktnetes.
Because rkt pod runs after plugin.SetUpPod() is called, so
getRunningPods() does not return the newly created pod, which
causes the hostport iptable rules to be missing for this new pod.
2016-06-23 13:17:01 -07:00
k8s-merge-robot 436a109a14 Merge pull request #27950 from mml/fed-nil-subtree
Automatic merge from submit-queue

Verify that the we get a non-nil subtree before consulting it.
2016-06-23 12:54:37 -07:00
Madhusudan.C.S a827ef0713 Addressed review comments. 2016-06-23 12:33:41 -07:00
Madhusudan.C.S 6894e74027 Append both the zone and the region to the federation query responses, not just the zone. 2016-06-23 11:54:32 -07:00
k8s-merge-robot e70434a19f Merge pull request #27896 from mml/fed-labels-not-annotations
Automatic merge from submit-queue

Look for the failure zone label in labels.
2016-06-23 11:35:07 -07:00
Yu-Ju Hong 07b8c61274 Bump minimum API version for docker to 1.21
The corresponding docker version is 1.9.x. Dropping support for docker 1.8.
2016-06-23 10:21:54 -07:00
Matt Liggett 7a40584f66 Verify that the we get a non-nil subtree before consulting it.
Fixes #27919
2016-06-23 09:51:14 -07:00
Matt Liggett c87b613412 Look for the failure zone label in labels.
Not annotations.  Found this working on #27819.
2016-06-23 09:50:03 -07:00
k8s-merge-robot 3a29aa7941 Merge pull request #27496 from hpcloud/hpe/vsphere-scsidriver
Automatic merge from submit-queue

Adding SCSI controller type filter for vSphere disk attach

Hot plug of disks to a SCSI controller of type lsilogic doesn't work as expected. When a device is detached from the controller, it fails to remove the device from the /dev path which makes the subsequent attaches to the node to fail. With scsi controller types lsilogic-sas or paravirtual this seems to work well. This patch filters the existing controller for these types, and if it doesn't find one, it creates a new controller for disk attach.

This PR is dependent on https://github.com/kubernetes/kubernetes/pull/26658 (1st commit) also targeting this for 1.3
2016-06-23 08:09:43 -07:00
Kanghua Wang b694fc0688 fix return value
// matchesNodeSelector returns true if pod matches node's labels.
Whether this return value should be false?
2016-06-23 16:14:55 +08:00
k8s-merge-robot 1f78e7ea68 Merge pull request #27905 from freehan/krestart
Automatic merge from submit-queue

avoid deleting cbr0 address due to subnet string mismatch

fix: #27873
2016-06-22 23:01:49 -07:00
k8s-merge-robot 89bb77d3e8 Merge pull request #27737 from yifan-gu/grace_period
Automatic merge from submit-queue

rkt: Refactor grace termination period.

Add `TimeoutStopSec` service option to support grace termination.

Found we can improve the grace-period-termination by adding a systemd service option.

cc @kubernetes/sig-rktnetes
2016-06-22 19:23:25 -07:00
k8s-merge-robot d36375954e Merge pull request #27733 from caesarxuchao/gc-parametercodec
Automatic merge from submit-queue

let dynamic client handle non-registered ListOptions

And register v1.ListOptions in the policy group.

Fix #27622

@lavalamp @smarterclayton @krousey
2016-06-22 17:36:16 -07:00
Minhan Xia 48169ce736 avoid deleting cbr0 address due to subnet string mismatch 2016-06-22 16:45:04 -07:00
k8s-merge-robot ae1e194766 Merge pull request #27893 from saad-ali/fixAwsEbsDevicePath
Automatic merge from submit-queue

Fix device path used by volume WaitForAttach

Fixes https://github.com/kubernetes/kubernetes/issues/27872 "AWS: problem mounting dynamic PVs"
2016-06-22 15:48:33 -07:00
k8s-merge-robot db43b68640 Merge pull request #27891 from mml/fed-nil-node
Automatic merge from submit-queue

Catch the case where we cannot find any nodes.
2016-06-22 13:43:12 -07:00
k8s-merge-robot a505958f2b Merge pull request #27878 from dcbw/cni-cleanup
Automatic merge from submit-queue

Make kubelet CNI network plugin runtime-agnostic

cni.go has a couple docker-isms in it still, so let's remove those and make the plugin runtime-agnostic.  Also fixes some docker-isms in kubenet that snuck in with the HostPort changes.
2016-06-22 13:43:04 -07:00
Chao Xu d9f07925be let dynamic client handle non-registered ListOptions;
register ListOptions for apis/policy
2016-06-22 13:18:50 -07:00
saadali dfe8e606c1 Fix device path used by volume WaitForAttach 2016-06-22 12:56:58 -07:00