Commit Graph

29796 Commits (a6dd89d7975cddec251b3c920f186818c6a8622d)

Author SHA1 Message Date
gmarek a6dd89d797 Add Controller field to OwnerReference 2016-05-31 15:33:35 +02:00
k8s-merge-robot 7b4e255219 Merge pull request #26535 from mwielgus/e2e-scale-down
Automatic merge from submit-queue

Enable cluster autoscaler scale down in e2e test

cc: @piosz @jszczepkowski @fgrzadkowski
2016-05-31 05:24:57 -07:00
k8s-merge-robot dc8ff81f5a Merge pull request #26534 from mwielgus/scale_down_env
Automatic merge from submit-queue

Allow to enable scale down in kube-up for gce

cc: @piosz @fgrzadkowski @jszczepkowski
2016-05-31 04:37:11 -07:00
k8s-merge-robot ae1fb82cfc Merge pull request #26073 from piosz/remove-metrics-group
Automatic merge from submit-queue

Removed metrics api group

```release-note
Removed metrics api group
```
The group is empty and unused. Kubelet Metrics API is defined in Kubelet code. Master Metrics API is defined in Heapster. Removing to avoid the confusion.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-31 03:50:24 -07:00
k8s-merge-robot c805303644 Merge pull request #26162 from jszczepkowski/kubectl-fix2
Automatic merge from submit-queue

Fixed check in kubectl autoscale.

```release-note
Fixed check in kubectl autoscale: cpu consumption can be higher than 100%.
```

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

Fixed check in kubectl autoscale: cpu consumption can be higher than 100%. Fixes #25815.
2016-05-31 03:00:05 -07:00
k8s-merge-robot 3d1b1a77e4 Merge pull request #26440 from mwielgus/remove-debug-touch
Automatic merge from submit-queue

Remove debug from GCI cluster autoscaler setup function

cc: @piosz @fgrzadkowski
2016-05-31 02:03:15 -07:00
k8s-merge-robot d4ffb03119 Merge pull request #26531 from gmarek/cidrs
Automatic merge from submit-queue

AllocateOrOccupyCIDR returs quickly

Fix #26511.

AllocateOrOccupy is called before adding a Node to NCs cache. It turns out that sending an update to API server can take too long which will make NC think that given Node does not exist and all Pods from it will be removed.

The fix is to move the long part of the call (updating NodeSpec) to a separate go-routine. To prevent overloading the server and huge number of retries we limit the number of concurrent Update calls.

cc @zmerlynn @davidopp
2016-05-31 02:03:11 -07:00
Piotr Szczesniak 22dc21d703 Removed metrics api group 2016-05-31 09:48:39 +02:00
gmarek 7cac170214 AllocateOrOccupyCIDR returs quickly 2016-05-31 09:11:42 +02:00
k8s-merge-robot d1277e34fd Merge pull request #25913 from pweil-/ds-tombstone
Automatic merge from submit-queue

daemonset handle DeletedFinalStateUnknown

During an e2e run in OpenShift we ran into the DS controller panic when handling `DeletedFinalStateUnknown`.  This PR checks for `DeletedFinalStateUnknown` and queues the embedded object if it is a `DaemonSet`.

@mikedanese - would you mind taking a look?
@deads2k  

```
panic: interface conversion: interface is cache.DeletedFinalStateUnknown, not *extensions.DaemonSet

goroutine 4369 [running]:
k8s.io/kubernetes/pkg/controller/daemon.func·005(0x2f8a0c0, 0xc20b559680)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/daemon/controller.go:160 +0x50
k8s.io/kubernetes/pkg/controller/framework.ResourceEventHandlerFuncs.OnDelete(0xc20a0ae090, 0xc20a0ae0a0, 0xc20a0ae0b0, 0x2f8a0c0, 0xc20b559680)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:178 +0x41
k8s.io/kubernetes/pkg/controller/framework.(*ResourceEventHandlerFuncs).OnDelete(0xc20b8ebf20, 0x2f8a0c0, 0xc20b559680)
	<autogenerated>:25 +0xb5
k8s.io/kubernetes/pkg/controller/framework.func·001(0x2f8a280, 0xc20b5522e0, 0x0, 0x0)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:248 +0x4be
k8s.io/kubernetes/pkg/controller/framework.(*Controller).processLoop(0xc20bb727e0)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:122 +0x6f
k8s.io/kubernetes/pkg/controller/framework.*Controller.(k8s.io/kubernetes/pkg/controller/framework.processLoop)·fm()
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:97 +0x27
k8s.io/kubernetes/pkg/util/wait.func·001()
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/util/wait/wait.go:66 +0x61
k8s.io/kubernetes/pkg/util/wait.JitterUntil(0xc209f8cfb8, 0x3b9aca00, 0x0, 0xc2080543c0)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/util/wait/wait.go:67 +0x8f
k8s.io/kubernetes/pkg/util/wait.Until(0xc209f8cfb8, 0x3b9aca00, 0xc2080543c0)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/util/wait/wait.go:47 +0x4a
k8s.io/kubernetes/pkg/controller/framework.(*Controller).Run(0xc20bb727e0, 0xc2080543c0)
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/framework/controller.go:97 +0x1fb
created by k8s.io/kubernetes/pkg/controller/daemon.(*DaemonSetsController).Run
	/data/src/github.com/openshift/origin/Godeps/_workspace/src/k8s.io/kubernetes/pkg/controller/daemon/controller.go:212 +0xae
```
https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_check/1002/artifact/origin/artifacts/test-cmd/logs/openshift.log
2016-05-30 17:54:17 -07:00
k8s-merge-robot 8a29f67fc1 Merge pull request #26524 from luxas/fix_test_typo
Automatic merge from submit-queue

Fix comment typos in #25972

@ixdy
2016-05-30 12:29:02 -07:00
Marcin Wielgus 2a03dfd56d Enable cluster autoscaler in e2e test 2016-05-30 19:18:40 +02:00
k8s-merge-robot 5a09908975 Merge pull request #26517 from wojtek-t/large_cluster_tests
Automatic merge from submit-queue

Some fixes to tests to support large clusters
2016-05-30 09:54:18 -07:00
k8s-merge-robot dff1ed1497 Merge pull request #26106 from soltysh/scheduledjob_validation
Automatic merge from submit-queue

ScheduledJob validation

@erictune while playing earlier today I've noticed `suspend` isn't a pointer which requires it to be set. Additionally the validation for job selectors is too strict in that it requires the selector to match produced pods, which doesn't make sense for SJ, I've changed it to being forbidden to set entirely.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-30 09:05:01 -07:00
k8s-merge-robot 6136d4c250 Merge pull request #25981 from liggitt/test-cmd-osx
Automatic merge from submit-queue

Allow running test-cmd on osx
2016-05-30 08:16:46 -07:00
Marcin 0b7c2fa6fe Allow to enable scale down in kube-up for gce 2016-05-30 17:07:54 +02:00
k8s-merge-robot 6a234a2cc2 Merge pull request #24882 from brendandburns/3rdparty
Automatic merge from submit-queue

Add support for 3rd party objects to kubectl label

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

@kubernetes/rh-ux
2016-05-30 07:24:51 -07:00
Maciej Szulik e1aa8835d9 Generated changes to suspend becoming pointer for ScheduledJob 2016-05-30 15:52:58 +02:00
Maciej Szulik d8b9495ea0 Change suspend to be pointer for ScheduledJob and modify validation to forbid setting job selectors 2016-05-30 15:43:23 +02:00
k8s-merge-robot 9aeeef1d81 Merge pull request #26414 from jsafrane/reduce-sync-period
Automatic merge from submit-queue

Reduce volume controller sync period

fixes #24236 and most probably also fixes #25294.
Needs #25881! With the cache, binder is not affected by sync period. Without the cache, binding of 1000 PVCs takes more than 5 minutes (instead of ~70 seconds).

15 seconds were chosen by fair 2d10 roll :-)
2016-05-30 05:54:51 -07:00
Lucas Käldström 46525a7d19 Fix comment typos in #25972 2016-05-30 15:37:49 +03:00
k8s-merge-robot e531a7784e Merge pull request #26242 from metral/refactor-get
Automatic merge from submit-queue

fix recursive get for proper err display

- refactor code to use `Infos()` instead
- fixes https://github.com/kubernetes/kubernetes/issues/26241
2016-05-30 05:04:04 -07:00
k8s-merge-robot 5643b7498f Merge pull request #25881 from jsafrane/devel/pv-add-cache
Automatic merge from submit-queue

volume controller: Add cache with the latest version of PVs and PVCs

When the controller binds a PV to PVC, it saves both objects to etcd. However, there is still an old version of these objects in the controller Informer cache. So, when a new PVC comes, the PV is still seen as available and may get bound to the new PVC. This will be blocked by etcd, still, it creates unnecessary traffic that slows everything down.

To make everything worse, when periodic sync with the old PVC is performed, this PVC is seen by the controller as Pending (while it's already Bound on etcd) and will be bound to a different PV. Writing to this PV won't be blocked by etcd, only subsequent write of the PVC fails. So, the controller will need to roll back the PV in another transaction(s). The controller can keep itself pretty busy this way.

Also, we save bound PVs (and PVCs) as two transactions - we save say PV.Spec first and then .Status. The controller gets "PV.Spec updated" event from etcd and tries to fix the Status, as it seems to the controller it's outdated. This write again fails - there already is a correct version in etcd.

As we can't influence the Informer cache, it is read-only to the controller, this patch introduces second cache in the controller, which holds latest and greatest version on PVs and PVCs to prevent these useless writes to etcd . It gets updated with events from etcd *and* after etcd confirms successful save of PV/PVC modified by the controller.

The cache stores only *pointers* to PVs/PVCs, so in ideal case it shares the actual object data with the informer cache. They will diverge only for a short time when the controller modifies something and the informer cache did not get update events yet.

@kubernetes/sig-storage
2016-05-30 04:13:18 -07:00
Wojciech Tyczynski 570232b9ec Fix GetReadySchedulableNodes function 2016-05-30 13:11:06 +02:00
Wojciech Tyczynski 0499108c3f Add [HPA] tag to HPA tests 2016-05-30 13:11:06 +02:00
k8s-merge-robot a9f96da679 Merge pull request #25291 from janetkuo/describe-rc-pods-non-flake
Automatic merge from submit-queue

Remove kubectl describe test from flaky list

## Pull Request Guidelines

1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md).
1. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md).
1. 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
```

Ref #25083 #25911

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-30 03:10:49 -07:00
k8s-merge-robot 5fd2bb5c20 Merge pull request #26047 from dims/fix-issue-26041
Automatic merge from submit-queue

Get install-etcd.sh to work on OSX

Check the platform before we download the etcd binary. On OSX, save
the zip file, unzip it and link the directory with the correct
name.

Fixes #26041
2016-05-30 02:19:02 -07:00
k8s-merge-robot 270e85960b Merge pull request #23801 from sttts/sttts-kubectl-completion-cmd
Automatic merge from submit-queue

Move shell completion generation into 'kubectl completion' command

Remove static shell completion scripts from the repo and add `completion` command to kubectl:

```bash
$ source <(kubectl completion bash)
```

or

```bash
$ source <(kubectl completion zsh)
```

This makes maintenance easier because no static scripts must be generated and committed anymore in the repo.

Moreover, kubectl is self-contained again for the user including the latest completion code. I am thinking about the use-case of updating kubectl via gcloud (or some package manager). The completion code is always in-sync, without the need to download a `contrib/completion/bash/kubectl` file from github.

Opinions are welcome /cc @eparis @nak3 

Fixes https://github.com/openshift/origin/issues/5290

<!-- 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/23801)
<!-- Reviewable:end -->
2016-05-30 01:30:16 -07:00
Jan Safranek 2aa9f1dd8f Reduce volume controller sync period 2016-05-30 09:59:31 +02:00
k8s-merge-robot 60c1b4e75f Merge pull request #25804 from mfojtik/add-batch-client
Automatic merge from submit-queue

Add BatchClient into clientset adaption

@soltysh FYI
2016-05-30 00:40:59 -07:00
Dr. Stefan Schimanski 9e25d9f614 Run hack/update-generated-docs.sh 2016-05-30 07:28:48 +02:00
Dr. Stefan Schimanski a79a420fde Move shell completion generation into 'kubectl completion' command 2016-05-30 07:23:36 +02:00
k8s-merge-robot 77de942e08 Merge pull request #26451 from Random-Liu/cache_image_history
Automatic merge from submit-queue

Kubelet: Cache image history to eliminate the performance regression

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

The image history operation takes almost 50% of cpu usage in kubelet performance test. We should cache image history instead of getting it from runtime everytime.

This PR cached image history in imageStatsProvider and added unit test.

@yujuhong @vishh 
/cc @kubernetes/sig-node 

Mark v1.3 because this is a relatively significant performance regression.

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-29 20:49:01 -07:00
k8s-merge-robot fe5edcf1b4 Merge pull request #26438 from aanm/adding-etcd-addr-option
Automatic merge from submit-queue

Add -addr option to hack/lib/etcd.h

Added -addr to etcd hack script so it listens on the same address specified in the `host` variable.

Signed-off-by: André Martins <aanm90@gmail.com>
2016-05-29 19:58:14 -07:00
k8s-merge-robot 023f11dc10 Merge pull request #26437 from pwittrock/fix-26435
Automatic merge from submit-queue

Node e2e - Fix issue where error in scp is not return.  Fixes #26435



[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-29 19:08:59 -07:00
k8s-merge-robot 195842713d Merge pull request #26418 from AdoHe/kubectl_env
Automatic merge from submit-queue

fix strategy patch diff list issue

fixes #25585 

@janetkuo @pwittrock ptal.
2016-05-29 18:18:14 -07:00
k8s-merge-robot 63931d39a3 Merge pull request #26349 from kargakis/fix-reaper-not-found-error
Automatic merge from submit-queue

kubectl: cast scale errors to actual errors when deleting

Fixes some of the deployment reaper timeouts in e2e

@kubernetes/deployment @soltysh
2016-05-29 17:29:30 -07:00
k8s-merge-robot 91977842ac Merge pull request #26330 from aledbf/test-iperf
Automatic merge from submit-queue

Use ubuntu-slim to reduce size of the iperf:e2e image

from
```
gcr.io/google_containers/iperf     e2e      8b3cc7064090        5 weeks ago     737.9 MB
```
to
```
gcr.io/google_containers/iperf     e2e      204325491636        33 seconds ago  61.09 MB
```

related to https://github.com/kubernetes/kubernetes/pull/25784#issuecomment-221706886
ping @bprashanth
2016-05-29 16:36:44 -07:00
k8s-merge-robot 32da727ca1 Merge pull request #26264 from luxas/remove_flannel_default
Automatic merge from submit-queue

Do not call NewFlannelServer() unless flannel overlay is enabled

Ref: #26093 

This makes so kubelet does not warn the user that iptables isn't in PATH, although the user didn't enable the flannel overlay.

@vishh @freehan @bprashanth
2016-05-29 15:49:00 -07:00
k8s-merge-robot 72479b82e0 Merge pull request #26019 from gyuho/kubectl_slice_append
Automatic merge from submit-queue

pkg/kubectl: preallocate slice
2016-05-29 15:00:15 -07:00
k8s-merge-robot eed13d702f Merge pull request #26253 from xiangpengzhao/fix_assertnotnil
Automatic merge from submit-queue

Add assert.NotNil for test case

I hardcode the `DefaultInterfaceName` from `eth0` to `eth-k8sdefault` at release 1.2.0,  in order to test my CNI plugins. When running the test, it panics and prints wrongly formatted messages as below.

In the test case `TestBuildSummary`, `containerInfoV2ToNetworkStats` will return `nil` if `DefaultInterfaceName` is not `eth0`. So maybe we should add `assert.NotNil` to the test case.

```
ok      k8s.io/kubernetes/pkg/kubelet/server    0.591s
W0523 03:25:28.257074    2257 summary.go:311] Missing default interface "eth-k8sdefault" for s%!(EXTRA string=node:FooNode)
W0523 03:25:28.257322    2257 summary.go:311] Missing default interface "eth-k8sdefault" for s%!(EXTRA string=pod:test0_pod1)
W0523 03:25:28.257361    2257 summary.go:311] Missing default interface "eth-k8sdefault" for s%!(EXTRA string=pod:test0_pod0)
W0523 03:25:28.257419    2257 summary.go:311] Missing default interface "eth-k8sdefault" for s%!(EXTRA string=pod:test2_pod0)
--- FAIL: TestBuildSummary (0.00s)
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=0x0 pc=0x471817]

goroutine 16 [running]:
testing.func·006()
        /usr/src/go/src/testing/testing.go:441 +0x181
k8s.io/kubernetes/pkg/kubelet/server/stats.checkNetworkStats(0xc20806d3b0, 0x140bbc0, 0x4, 0x0, 0x0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_test.go:296 +0xc07
k8s.io/kubernetes/pkg/kubelet/server/stats.TestBuildSummary(0xc20806d3b0)
        /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubelet/server/stats/summary_test.go:124 +0x11d2
testing.tRunner(0xc20806d3b0, 0x1e43180)
        /usr/src/go/src/testing/testing.go:447 +0xbf
created by testing.RunTests
        /usr/src/go/src/testing/testing.go:555 +0xa8b
```
2016-05-29 14:13:00 -07:00
k8s-merge-robot 0fc573296d Merge pull request #26169 from victorgp/master
Automatic merge from submit-queue

Setting TLS1.2 minimum because TLS1.0 and TLS1.1 are vulnerable

TLS1.0 is known as vulnerable since it can be downgraded to SSL
https://blog.varonis.com/ssl-and-tls-1-0-no-longer-acceptable-for-pci-compliance/

TLS1.1 can be vulnerable if cipher RC4-SHA is used, and in Kubernetes it is, you can check it with
`
openssl s_client -cipher RC4-SHA -connect apiserver.k8s.example.com:443
`

https://www.globalsign.com/en/blog/poodle-vulnerability-expands-beyond-sslv3-to-tls/

Test suites like Qualys are reporting this Kubernetes issue as a level 3 vulnerability, they recommend to upgrade to TLS1.2 that is not affected, quoting Qualys:

`
RC4 should not be used where possible. One reason that RC4 was still being used was BEAST and Lucky13 attacks against CBC mode ciphers in
SSL and
TLS. However, TLSv 1.2 or later address these issues.
`
2016-05-29 13:24:46 -07:00
k8s-merge-robot 2253f3d824 Merge pull request #26021 from hongchaodeng/random
Automatic merge from submit-queue

scheduler: remove unused random generator

The way scheduler selecting host has been changed to round-robin.
Clean up leftover.
2016-05-29 12:35:00 -07:00
k8s-merge-robot 10b271c6de Merge pull request #26078 from mfojtik/fix-nil-annnotations
Automatic merge from submit-queue

Fix panic when the namespace flag is not present

We don't set the namespace in OpenShift, so we need to check if the namespace flag is present.
2016-05-29 10:32:33 -07:00
k8s-merge-robot 1e44212890 Merge pull request #26156 from gmarek/base64
Automatic merge from submit-queue

Change base64 -d flag to --decode flag to make it BSD compatible

cc @roberthbailey 

Fixes #25998
2016-05-29 09:45:49 -07:00
k8s-merge-robot 4e62b7f2e1 Merge pull request #26124 from thockin/logo-font-to-path
Automatic merge from submit-queue

Convert the font (ubuntu) to paths in SVG

Closes #26103

Tim, PTAL
2016-05-29 08:50:28 -07:00
k8s-merge-robot 14a6fb7d0f Merge pull request #26018 from gyuho/slice_append
Automatic merge from submit-queue

pkg/runtime: preallocate slice in unstructured.go
2016-05-29 07:20:50 -07:00
k8s-merge-robot 7030dca4c8 Merge pull request #25989 from jingxu97/bug-tmpdir
Automatic merge from submit-queue

use MkTmpDir instead of ioutil.TempDir in testing

fixes #20243
2016-05-29 06:32:36 -07:00
k8s-merge-robot feee4834c8 Merge pull request #25685 from pwittrock/nodee2e
Automatic merge from submit-queue

Support per-test-environment ginkgo flags for node e2e tests to facilitate skipping miss behaving tests in PR builder

We had an issue today where some node e2e tests were timing out in the pr builder.  We want to be able to skip tests in the pr builder and leave them running in the CI if this happens again.


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-05-29 05:42:51 -07:00
k8s-merge-robot a99e4ca793 Merge pull request #25678 from rajdeepd/branch1
Automatic merge from submit-queue

Added Test Cases for Pod

Test case modified for Pod
2016-05-29 04:53:06 -07:00