Commit Graph

47309 Commits

Author SHA1 Message Date
Kubernetes Submit Queue
f99e9a5082 Merge pull request #44720 from FengyunPan/use-const
Automatic merge from submit-queue

Use const value for pod's conditions

None
2017-04-20 14:57:31 -07:00
Jess Frazelle
2425f58133
Update CHANGELOG.md for v1.4.12. 2017-04-20 17:30:20 -04:00
Zihong Zheng
a95c71e8b8 Refine service external traffic validation 2017-04-20 14:12:15 -07:00
Kubernetes Submit Queue
870585e8e1 Merge pull request #44651 from knightXun/string
Automatic merge from submit-queue (batch tested with PRs 44594, 44651)

remove strings.compare(), use string native operation

I notice we use strings.Compare() in some code, we can remove it and use native operation.
2017-04-20 14:08:59 -07:00
Kubernetes Submit Queue
6bf7914a71 Merge pull request #44594 from xiangpengzhao/describe-node-depre-phase
Automatic merge from submit-queue

Delete deprecated node phase in kubect describe node.

**What this PR does / why we need it**:
Since NodePhase is no longer used, delete it in `kubect describe node` result. 

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
ref: https://github.com/kubernetes/kubernetes/pull/44388

**Release note**:

```release-note
NONE
```
2017-04-20 13:48:52 -07:00
derek mcquay
d047dfbc6f kubeadm: add flag to skip token print out 2017-04-20 13:12:37 -07:00
Rye Terrell
20c36e9c93 prevent installation of docker from upstream 2017-04-20 15:03:36 -05:00
Kubernetes Submit Queue
6bf9f2f0bb Merge pull request #44721 from piosz/remove-fluentd-manifest
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

Removed fluentd-gcp manifest pod

```release-note
Fluentd manifest pod is no longer created on non-registered master when creating clusters using kube-up.sh.
```
2017-04-20 12:57:08 -07:00
Kubernetes Submit Queue
7b43f922aa Merge pull request #42176 from enisoc/controller-ref-job
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

Job: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Job into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Job does not fight with other controllers over control of Pods.

Ref: #24433

**Special notes for your reviewer**:

**Release note**:

```release-note
Job controller now respects ControllerRef to avoid fighting over Pods.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-04-20 12:57:06 -07:00
Kubernetes Submit Queue
f25a657574 Merge pull request #42177 from enisoc/controller-ref-cronjob
Automatic merge from submit-queue (batch tested with PRs 42177, 42176, 44721)

CronJob: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings CronJob into compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that other controllers do not fight over control of objects that a CronJob owns.

**Special notes for your reviewer**:

**Release note**:

```release-note
CronJob controller now respects ControllerRef to avoid fighting with other controllers.
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-04-20 12:57:03 -07:00
Mik Vyatskov
a575762158 Mark Stackdriver Logging e2e tests with a feature 2017-04-20 21:39:04 +02:00
Dan Williams
4cd6d34a0b util/iptables: check for and use new iptables-restore 'wait' argument
iptables-restore did not previously perform any locking, meaning that
when callers (like kube-proxy) asked iptables-restore to write large
numbers of rules, the iptables-restore process might run in parallel
with other 'iptables' invocations in kubelet (hostports), docker,
and other software.  This causes errors like:

"CNI request failed with status 400: 'Failed to ensure that nat chain
POSTROUTING jumps to MASQUERADE: error checking rule: exit status 4:
iptables: Resource temporarily  unavailable."

or from Docker

"Failed to allocate and map port 1095-1095: iptables failed:
iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 1095
-j DNAT --to-destination 10.1.0.2:1095 ! -i lbr0: iptables:
Resource temporarily unavailable.\n (exit status 4)"

iptables-restore "wait" functionality was added in iptables git
commit 999eaa241212d3952ddff39a99d0d55a74e3639e but is NOT YET
in a released version of iptables.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1417234
2017-04-20 13:38:44 -05:00
Kubernetes Submit Queue
223a8e598d Merge pull request #44238 from zhouhaibing089/no-flavor-usage
Automatic merge from submit-queue (batch tested with PRs 44555, 44238)

openstack: remove field flavor_to_resource

I believe there is no usage about `flavor_to_resource`, and I think there is no need to build that information, too.

cc @anguslees 

**Release note:**

```
NONE
```
2017-04-20 11:02:58 -07:00
Jordan Liggitt
63b5650885
Explicit namespace from kubeconfig should override in-cluster config 2017-04-20 13:46:23 -04:00
Kubernetes Submit Queue
1413f2e862 Merge pull request #44555 from luxas/remove_hyperkube_docker_multinode
Automatic merge from submit-queue

Remove the old docker-multinode files that were built into the hyperkube image

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

ref: https://goo.gl/VxSaKx

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
The hyperkube image has been slimmed down and no longer includes addon manifests and other various scripts. These were introduced for the now removed docker-multinode setup system.
```

cc @jbeda @brendandburns @bgrant0607 @justinsb @mikedanese
2017-04-20 10:27:04 -07:00
Michail Kargakis
63e8484567
controller: fix saturation check for Deployments
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-20 19:22:30 +02:00
derek mcquay
60efc38ef3 kubeadm: remove func arg that isn't being used 2017-04-20 09:47:17 -07:00
Kubernetes Submit Queue
9543510d16 Merge pull request #44449 from liggitt/rbac-allocations
Automatic merge from submit-queue

Switch to pointer to policy rule, visit and short circuit during authorization

Ref #40015

* Switches policy rule helper methods to work with pointers
* Switches authorization to use a short-circuiting visitor

Best-case, authorization short-circuits early and avoids accumulating rules it never needs to check

Worst-case (a forbidden request), it still checks all the applicable rules, but requires less allocation to do so

$ go test ./plugin/pkg/auth/authorizer/rbac/... -bench=. -benchmem -run Bench

on master:
```
BenchmarkAuthorize/allow_list_pods-8           300000   4373 ns/op  3840 B/op  26 allocs/op
BenchmarkAuthorize/allow_update_pods/status-8  300000   5121 ns/op  3840 B/op  26 allocs/op
BenchmarkAuthorize/forbid_educate_dolphins-8   300000   4706 ns/op  3840 B/op  26 allocs/op
```

with short-circuiting and policy rule pointer changes:
```
BenchmarkAuthorize/allow_list_pods-8           2000000  930 ns/op   64 B/op    2 allocs/op
BenchmarkAuthorize/allow_update_pods/status-8  1000000  1656 ns/op  64 B/op    2 allocs/op
BenchmarkAuthorize/forbid_educate_dolphins-8   500000   3395 ns/op  1488 B/op  25 allocs/op
```
2017-04-20 09:39:00 -07:00
Anthony Yeh
06d6a9ec48 Update CHANGELOG.md for v1.7.0-alpha.2. 2017-04-20 09:01:18 -07:00
Jordan Liggitt
b2994a297d
Add nonResourceURL wildcard coverage tests 2017-04-20 11:43:46 -04:00
Jordan Liggitt
67360883bc
Switch to pointer to policy rule, visit and short circuit during authorization 2017-04-20 10:52:53 -04:00
Harry Zhang
cef629c63e Use len of pods in stateful set error 2017-04-20 22:31:23 +08:00
gmarek
7ad55c8a47 Output some spam to files instead of main log files 2017-04-20 16:13:40 +02:00
Piotr Szczesniak
113f120e29 Removed fluentd-gcp manifest pod 2017-04-20 15:53:24 +02:00
Kubernetes Submit Queue
2c6fbc95c4 Merge pull request #43171 from ravisantoshgudimetla/kubectl_taints_ux
Automatic merge from submit-queue

Refactoring reorganize taints function in kubectl to expose operations

**What this PR does / why we need it**:
This adds some UX functionality when specifying taints using kubectl.
For example:
```
./kubectl.sh taint nodes XYZ dedicated1=abca2:NoSchedule 
node "XYZ" tainted
 ./kubectl.sh taint nodes XYZ dedicated1=abca1:NoSchedule --overwrite=True
node "XYZ overwritten
./kubectl.sh taint nodes XYZ dedicated1-
node "XYZ" untainted
./kubectl.sh taint nodes XYZ dedicated=abca1:NoSchedule dedicated1-
node "XYZ" modified
```
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43167 

**Release note**:
```
Fixed the output of kubectl taint node command with minor improvements.
```
2017-04-20 04:17:18 -07:00
Tomas Smetana
852c44ae59 Fix issue #34242: Attach/detach should recover from a crash
When the attach/detach controller crashes and a pod with attached PV is deleted
afterwards the controller will never detach the pod's attached volumes. To
prevent this the controller should try to recover the state from the nodes
status.
2017-04-20 13:04:50 +02:00
Cao Shufeng
939b962975 refactor code from restful namer
Some codes are replaced because they will never run.
2017-04-20 17:34:08 +08:00
Kubernetes Submit Queue
94a5074bd6 Merge pull request #44565 from vmware/kubernetes-e2e-v7
Automatic merge from submit-queue

adding test for volume fstype validation

**What this PR does / why we need it**:
This PR is adding a test for volume fstype validation. Test verifies fstype specified in storage-class is being honored after volume creation.

Steps:

1. Create StorageClass with fstype set to valid type (default case included). 
2. Create PVC which uses the StorageClass created in step 1.
3. Wait for PV to be provisioned.
4. Wait for PVC's status to become Bound.
5. Create pod using PVC on specific node.
6. Wait for Disk to be attached to the node.
7. Execute command in the pod to get fstype.
8. Delete pod and Wait for Volume Disk to be detached from the Node.
9. Delete PVC, PV and Storage Class.



**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```

cc: @jeffvance @tusharnt
2017-04-20 01:25:20 -07:00
Kubernetes Submit Queue
33bdec3f22 Merge pull request #44696 from justinsb/fix_44695
Automatic merge from submit-queue (batch tested with PRs 42272, 44696)

e2e test fix: Wait longer when first creating ELB

On any cloud (GCE or AWS), a lag between creating the LoadBalancer and
having it actually start serving traffic is expected.  On AWS the lag is
larger, and we weren't correctly using the longer wait on our first
request.

Use a longer wait period on our first request.

Fix #44695

```release-note
NONE
```
2017-04-20 00:33:01 -07:00
xilabao
c1197924cd fix kubeadm init when certdir changed 2017-04-20 15:23:45 +08:00
caiyixiang
31829850b9 delete unuse const 2017-04-20 15:17:36 +08:00
Kubernetes Submit Queue
afc01d92d2 Merge pull request #42272 from marun/apiserver-fail-fast
Automatic merge from submit-queue

apiserver: Update genericapiserver to panic on listener error

Previously runServer would try to listen again if a listener error occurred.  This commit changes the response to a panic to allow a process manager (systemd/kubelet/etc) to react to the failure.

**Release note**:

```release-note
The Kubernetes API server now exits if it encounters a networking failure (e.g. the networking interface hosting its address goes away) to allow a process manager (systemd/kubelet/etc) to react to the problem.  Previously the server would log the failure and try again to bind to its configured address:port.
```

cc: @liggitt @sttts @deads2k @derekwaynecarr
2017-04-19 23:51:34 -07:00
Wojciech Tyczynski
2f250435fd Don't rebuild endpoints map in iptables kube-proxy all the time. 2017-04-20 08:34:46 +02:00
shashidharatd
36e7ed4cae Auto generated code 2017-04-20 10:37:50 +05:30
shashidharatd
3cb4d69c0b Add new unit tests for federated service dns 2017-04-20 10:37:50 +05:30
shashidharatd
721224d72a Add new unit tests for federated service controller 2017-04-20 10:37:50 +05:30
shashidharatd
d00eca48da Use federated informer framework and use annotations to store lb ingress 2017-04-20 10:37:50 +05:30
Kubernetes Submit Queue
a40fef5db7 Merge pull request #40890 from marun/e2e-use-kubeconfig-host
Automatic merge from submit-queue

e2e: Prefer kubeconfig host to default

Previously it was necessary to pass ``-host`` to ``e2e.test`` even if ``-kubeconfig`` was specified since otherwise a localhost default would be used.  This change ensures that the default is only used when kubeconfig is not set. 

cc: @jayunit100
2017-04-19 20:26:00 -07:00
shashidharatd
bacd7b7454 Add few new fake hooks to test 2017-04-20 08:55:36 +05:30
shashidharatd
b28f41eb02 Add new ResourceEventHandlerFuncs to federated informer 2017-04-20 08:55:36 +05:30
shashidharatd
58b2cce95e Add types for federated service ingress annotation 2017-04-20 08:55:36 +05:30
FengyunPan
1bad02cb22 Use const value for pod's conditions 2017-04-20 10:43:24 +08:00
Justin Santa Barbara
854900c4a1 e2e test fix: Wait longer when first creating ELB
On any cloud (GCE or AWS), a lag between creating the LoadBalancer and
having it actually start serving traffic is expected.  On AWS the lag is
larger, and we weren't correctly using the longer wait on our first
request.

Use a longer wait period on our first request.

Fix #44695
2017-04-19 22:12:59 -04:00
Kubernetes Submit Queue
fba605ce05 Merge pull request #44661 from xiangpengzhao/fix-vsphere-panic
Automatic merge from submit-queue (batch tested with PRs 44687, 44689, 44661)

Fix panic when using `kubeadm init` with vsphere cloud-provider

**What this PR does / why we need it**:
Check if the reference is nil when finding machine reference by UUID.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #44603

**Special notes for your reviewer**:
This is just a quick fix for the panic.

**Release note**:

```release-note
NONE
```
2017-04-19 18:52:59 -07:00
Kubernetes Submit Queue
6d67cdd4d9 Merge pull request #44689 from rmmh/avoid-get-kube-dl-flake
Automatic merge from submit-queue (batch tested with PRs 44687, 44689, 44661)

Retry in get-kube.sh to avoid download flakes.

GCS has up to 2% 5xx rates, so retrying is critical.

This is currently failing about 8 times per day [according to the dashboard](https://storage.googleapis.com/k8s-gubernator/triage/index.html?test=Extract#be2f33fb1e6dd2389d12). It could be backported to reduce the flake rate.

Relase note:
```release-note
NONE
```
2017-04-19 18:52:58 -07:00
Kubernetes Submit Queue
18cd0f48ba Merge pull request #44687 from cblecker/hacklib-tar
Automatic merge from submit-queue

Add hack/lib to kubernetes release tarball

**What this PR does / why we need it**:
Add hack/lib to kubernetes release tarball, to fix an issue with https://get.k8s.io/ script introduced in #42748.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/pull/42748#issuecomment-295412268

**Special notes for your reviewer**:
I'm new to bazel, so hopefully I'm not off-base here :)

**Release note**:

```release-note
NONE
```

cc: @ixdy @dcbw @smarterclayton
2017-04-19 18:09:26 -07:00
Cezar Sa Espinola
cc5a309fd7
prevent corrupted spdy stream after hijacking connection
Reading directly from a hijacked connection isn't safe because some
data may have already been read by the server before Hijack was called.
To ensure all data will be received it's safer to read from the returned
bufio.Reader.
2017-04-19 21:50:49 -03:00
Mike Danese
0800ab92fb e2e test client creation using the certificates API 2017-04-19 17:35:52 -07:00
Kubernetes Submit Queue
36c5d12cf4 Merge pull request #44452 from gnufied/fix-aws-device-failure-reuse
Automatic merge from submit-queue

Implement LRU for AWS device allocator

On failure to attach do not use device from pool
    
In AWS environment when attach fails on the node
lets not use device from the pool. This makes sure
that a bigger pool of devices is available.
2017-04-19 16:38:13 -07:00
Daniel Nardo
2320fde49c Update kubelet to use the network-plugin-dir if the cni-bin-dir flag
is not set.
2017-04-19 16:33:06 -07:00