Commit Graph

47278 Commits (09747e6bee78fb8b71356309d6ede84142aee9eb)

Author SHA1 Message Date
Roman Mohr b39b3ba016 client-go workqueue example
Demonstrates how to compose a controller out of cache.Controller,
cache.Indexer and a workqueue.
2017-04-21 12:41:30 +02:00
Wojciech Tyczynski 4160d70ecf Remove spammy logs in tests 2017-04-21 12:14:55 +02:00
Kubernetes Submit Queue cd37aaafb3 Merge pull request #44487 from resouer/fix-ss-error
Automatic merge from submit-queue (batch tested with PRs 41498, 44487)

Use len of pods in stateful set error

**What this PR does / why we need it**:
Sync stateful set reports wrong error, we need to fix it.

**Release note**:

```release-note
`NONE`
```
2017-04-21 01:55:57 -07:00
Kubernetes Submit Queue cdc0cbdac4 Merge pull request #41498 from mikebryant/cinder-virtio-scsi
Automatic merge from submit-queue

cinder: Add support for the KVM virtio-scsi driver

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

The VirtIO SCSI driver for KVM changes the way disks appear in /dev/disk/by-id.
This adds support for the new format.
Without this, volume attaching on an openstack cluster using this kvm driver doesn't work

**Special notes for your reviewer**:
Does this need e2e tests? I couldn't find anywhere to add another openstack configuration used in the e2e tests.

Wiki page about this: https://wiki.openstack.org/wiki/Virtio-scsi-for-bdm

**Release note**:

```release-note
cinder: Add support for the KVM virtio-scsi driver
```
2017-04-21 01:55:23 -07:00
Wojciech Tyczynski c7353432df Don't rebuild service map in iptables kube-proxy all the time 2017-04-21 09:41:27 +02:00
Kubernetes Submit Queue d3b3c31147 Merge pull request #44692 from dnardo/e2e_node_test
Automatic merge from submit-queue

Update kubelet to use the network-plugin-dir if the cni-bin-dir flag is not set.

This is a fix for the regession raised in issue #44683



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

**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
```
2017-04-21 00:27:00 -07:00
Humble Chirammal dddd4783a4 Replace variable name to be more go friendly.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2017-04-21 12:38:13 +05:30
xilabao 4ec40e3789 fix config path broken in kubeadm 2017-04-21 14:18:43 +08:00
nikhiljindal 74b511345f Fixing build break for federation 2017-04-20 22:29:53 -07:00
Kubernetes Submit Queue bf532a30e3 Merge pull request #44738 from crassirostris/stackdriver-logging-tests-feature
Automatic merge from submit-queue

Mark Stackdriver Logging e2e tests with a feature

Makes Stackdriver Logging e2e tests, except for the most basic one, run in the separate tests suites, prepared by https://github.com/kubernetes/test-infra/pull/2542
2017-04-20 22:03:01 -07:00
xiangpengzhao b577754726 Print conditions of RC/RS in 'kubectl describe' command 2017-04-21 10:54:17 +08:00
Justin Santa Barbara 82d600bb5c Exclude master from LoadBalancer / NodePort
The servicecontroller documents that the master is excluded from the
LoadBalancer / NodePort, but this is broken for clusters where we are
using taints for the master (as introduced in 1.6), instead of marking
the master as unschedulable.

This restores the desired documented behaviour, by excluding nodes that
are labeled as masters with the new 1.6 labels, even if they use the new
1.6 taints.

Fix #33884
2017-04-20 22:19:43 -04:00
shiywang 03a58ceeaa Add --all support for view-last-applied 2017-04-21 08:45:30 +08:00
Chris Glass cf23d4c939 Add Ubuntu as a platform for e2e tests on GCE
Using Ubuntu on GCE to run cluster e2e tests requires slightly different
node.yaml and master.yaml files than GCI, because Ubuntu uses systemd as
PID 1, wheras GCI uses upstart with a systemd delegate. Therefore the
e2e tests fail using those files since the kubernetes services are not
brought back up after a node/master reboot.
2017-04-20 17:40:51 -07:00
Kubernetes Submit Queue 3153cd6841 Merge pull request #44356 from copejon/deflake-e2e-volume-pd
Automatic merge from submit-queue

De-Flake Volume E2E:  force GCEPD detach to prevent timeout

**What this PR does / why we need it**:
Fix flake`[k8s.io] Volumes [Volume] [k8s.io] PD should be mountable [Flaky] 5m38s.  

Flake occurs as a result of an automated detach taking longer than 5 minutes, which exceeds the timeout limit of the delete function.

This PR adds explicit detach and wait func calls before the deletion.  By forcing the detach and giving GCE an appropriate timeout limit, this should squash the timeout flake.  This also significantly shortens cleanup time.

This PR does not remove the [Flaky] tag.  Once this PR is merged, I'll keep an eye on the test grid for ~1 week.  If no flakes surface, I'll submit a PR to pull the tag off.

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

**Release note**:

```release-note
NONE
```
2017-04-20 17:05:54 -07:00
Jacob Simpson e992eaec8f Add bootstrap support to certificate manager. 2017-04-20 16:27:32 -07:00
Kubernetes Submit Queue db53e80445 Merge pull request #39732 from tsmetana/issue_34242
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732)

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 and figure out which volumes to detach. This requires some changes in the volume providers too: the only information available from the nodes is the volume name and the device path. The controller needs to find the correct volume plugin and reconstruct the volume spec just from the name. This required a small change also in the volume plugin interface.

Fixes Issue #34242.
cc: @jsafrane @jingxu97
2017-04-20 16:01:04 -07:00
Kubernetes Submit Queue 0a443ba4c7 Merge pull request #44494 from wojtek-t/faster_kube_proxy
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732)

Don't rebuild endpoints map in iptables kube-proxy all the time.

@thockin - i think that this PR should help with yours https://github.com/kubernetes/kubernetes/pull/41030 - it (besides performance improvements) clearly defines when update because of endpoints is needed. If we do the same for services (I'm happy to help with it), i think it should be much simpler.

But please take a look if it makes sense from your perspective too.
2017-04-20 16:01:02 -07:00
Kubernetes Submit Queue 5cbe7b69fb Merge pull request #44681 from wwwtyro/rye/disable-upstream-docker
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732)

prevent installation of docker from upstream

**What this PR does / why we need it**: Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm.

**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
Disallows installation of upstream docker from PPA in the Juju kubernetes-worker charm.
```
2017-04-20 16:01:00 -07:00
Kubernetes Submit Queue 3cc0e4b5b8 Merge pull request #44704 from caiyixiang/del_unuse_const
Automatic merge from submit-queue (batch tested with PRs 44722, 44704, 44681, 44494, 39732)

delete unuse const

delete unuseful const
2017-04-20 16:00:58 -07:00
Kubernetes Submit Queue e07497b6b3 Merge pull request #44722 from gmarek/netstat_to_file
Automatic merge from submit-queue

Redirect some test spam to files instead of main log files

Ref #44707

@kubernetes/test-infra-maintainers @wojtek-t
2017-04-20 15:45:04 -07:00
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