Commit Graph

4136 Commits (ee177dbbfe405b11460eca48e622b55bdcad87a0)

Author SHA1 Message Date
Kubernetes Submit Queue 125bf9c164 Merge pull request #38270 from resouer/fix-zone
Automatic merge from submit-queue (batch tested with PRs 39394, 38270, 39473, 39516, 36243)

Fix wrong skipf parameter

**How to reproduce**

When run e2e test, it reports `%!!(MISSING)d(MISSING)`:
```
STEP: Checking for multi-zone cluster.  Zone count = 1
Dec  6 14:16:43.272: INFO: Zone count is %!!(MISSING)d(MISSING), only run for multi-zone clusters, skipping test
[AfterEach] [k8s.io] Multi-AZ Clusters
```

We need to pass a string parameter to `SkipUnlessAtLeast`
2017-01-09 12:05:19 -08:00
Bowei Du ba215e2bf2 Result of hack/update-all.sh 2017-01-06 13:08:56 -08:00
Bowei Du 21f84db48f Remove reference to dns code from e2e test
This reference was not necessary and avoids having to vendor dns
back into Kubernetes for now.
2017-01-06 12:57:46 -08:00
Kubernetes Submit Queue 5fc2b3522c Merge pull request #39132 from madhusudancs/fed-newtest-refactor-develop-sh
Automatic merge from submit-queue

[Federation] Recompute registry name and version tag in the federation up script.sh and a bunch of other fixes.
2017-01-06 09:26:08 -08:00
Kubernetes Submit Queue 9ce93ed50a Merge pull request #39496 from stevekuznetsov/skuznets/fix-e2e-container-context
Automatic merge from submit-queue (batch tested with PRs 39493, 39496)

Use privileged containers for host path e2e tests

Test containers need to run as spc_t in order to interact with the host
filesystem under /tmp, as the tests for HostPath are doing. Docker will
transition the container into this domain when running the container as
privileged.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Currently, this test fails with AVC denials like:
```
time->Thu Jan  5 10:17:51 2017
type=SYSCALL msg=audit(1483629471.846:6623): arch=c000003e syscall=257 success=no exit=-13 a0=ffffffffffffff9c a1=c820010120 a2=80241 a3=1a4 items=0 ppid=4112 pid=4130 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mt" exe="/mt" subj=system_u:system_r:svirt_lxc_net_t:s0:c123,c328 key=(null)
type=AVC msg=audit(1483629471.846:6623): avc:  denied  { write } for  pid=4130 comm="mt" name="sub-path" dev="xvda2" ino=118491348 scontext=system_u:system_r:svirt_lxc_net_t:s0:c123,c328 tcontext=system_u:object_r:container_runtime_tmp_t:s0 tclass=dir
```

```release-note
NONE
```

/cc @ncdc @pmorie
2017-01-06 08:44:20 -08:00
Madhusudan.C.S 48f79cf600 Quote a bash variable, fix a typo and add some additional logging. 2017-01-06 19:17:48 +05:30
Harry Zhang 993a99dce9 Fix wrong skipf parameter 2017-01-06 09:45:26 +00:00
Steve Kuznetsov d60cb81f7f
Use privileged containers for host path e2e tests
Test containers need to run as spc_t in order to interact with the host
filesystem under /tmp, as the tests for HostPath are doing. Docker will
transition the container into this domain when running the container as
privileged.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-05 17:24:09 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Jeff Grafton a53c5f2a4f use gazel to autofix formatting 2017-01-05 14:14:12 -08:00
Jordan Liggitt 0902c55c8b
Ensure invalid token returns 401 error 2017-01-04 11:37:05 -05:00
Kubernetes Submit Queue f143ce01e9 Merge pull request #39204 from peay/cronjob-active-forever
Automatic merge from submit-queue

Remove jobs that do not exist from active list of CronJob

**What this PR does / why we need it**: This PR modifies the controller for CronJob to remove from the active job list any job that does not exist anymore, to avoid staying blocked in active state forever. See #37957.

**Which issue this PR fixes**: fixes #37957 

**Special notes for your reviewer**:

**Release note**:

```
```
2017-01-04 03:16:37 -08:00
Kubernetes Submit Queue 819535b96a Merge pull request #36245 from fraenkel/env_configmap
Automatic merge from submit-queue (batch tested with PRs 38433, 36245)

Allow pods to define multiple environment variables from a whole ConfigMap

Allow environment variables to be populated from ConfigMaps

- ConfigMaps represent an entire set of EnvVars
- EnvVars can override ConfigMaps


fixes #26299
2017-01-03 23:28:09 -08:00
Kubernetes Submit Queue f95362f953 Merge pull request #39367 from jsafrane/sudo
Automatic merge from submit-queue (batch tested with PRs 39284, 39367)

e2e: Use sudo to start/stop kubelet service

It seems that user 'jenkins' does not have permissions to manage services. sudo is already used to e.g. check iptables in https://github.com/kubernetes/kubernetes/blob/master/test/e2e/service.go#L402

Fixes #37956
2017-01-03 19:20:10 -08:00
Zihong Zheng e5944f56dc Moves e2e service util functions into service_util.go and cleans up test codes 2017-01-03 15:36:15 -08:00
peay d8d69d1a36 Remove jobs that do not exist from active list of CronJob 2017-01-03 23:12:50 +00:00
Kubernetes Submit Queue d6dbd50909 Merge pull request #37093 from simonswine/fix-tolerate-unready-endpoints-pods-terminating
Automatic merge from submit-queue (batch tested with PRs 39092, 39126, 37380, 37093, 39237)

Endpoints with TolerateUnready annotation, should list Pods in state terminating

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

We are using preStop lifecycle hooks to gracefully remove a node from a cluster. This hook is potentially long running and after the preStop hook is fired, the DNS resolution of the soon to be stopped Pod is failing, which causes a failure there.

**Special notes for your reviewer**:

Would be great to backport that to 1.4, 1.3 

**Release note**:

```release-note
Endpoints, that tolerate unready Pods, are now listing Pods in state Terminating as well
```

@bprashanth
2017-01-03 09:45:24 -08:00
Michael Fraenkel 2d803afc98 ConfigMaps populate environment variables 2017-01-03 11:02:15 -05:00
deads2k 3a265d0eec add permissions to kubectl test for rbac 2017-01-03 09:59:13 -05:00
Christian Simon b44de1ef27 Fix: With TolerateUnready set, endpoints are still listed for a Pod in state terminating
* Otherwise it prevents long running task in a preStop hook to succeed,
that require DNS resolution
2017-01-03 13:00:15 +00:00
Jan Safranek 309311fb3d e2e: Use sudo to start/stop kubelet service
It seems that user 'jenkins' does not have permissions to manage services.
2017-01-03 12:10:46 +01:00
Kubernetes Submit Queue 856c3623b5 Merge pull request #38879 from copejon/test-disruptive-kubelet
Automatic merge from submit-queue

Add Persistent Volume E2E in the context of a disrupted kubelet

This PR adds a test suite for persistent volumes affected by a disrupted kubelet.  Two cases are presented:

1.  A volume mounted via PVC remains accessible after a kubelet restart.
2.  When a pod is deleted while the kubelet is down, the mounted volume is unmounted successfully.
2017-01-02 06:45:52 -08:00
Mike Danese 161c391f44 autogenerated 2016-12-29 13:04:10 -08:00
Kubernetes Submit Queue 99939d360a Merge pull request #39278 from jszczepkowski/ha-e2e-zones
Automatic merge from submit-queue

Added e2e test for HA master that creates multizone workers.
2016-12-29 02:06:45 -08:00
Jerzy Szczepkowski cdd8ce7b20 Added e2e test for HA master that creates multizone workers.
Added e2e test for HA master that creates multizone workers.
2016-12-29 09:35:01 +01:00
Kubernetes Submit Queue cc8065f1f1 Merge pull request #39266 from zmerlynn/fix-kubectl-rbac
Automatic merge from submit-queue

Remove system:anonymous check from kubectl test

This verbiage doesn't appear when the cluster is `AlwaysAllow` (and just makes the check more brittle).

Follow-on to #39263, this is the last (consistent) failure on [kops-aws](https://k8s-testgrid.appspot.com/google-aws#kops-aws&sort-by-failures=)
2016-12-28 10:50:30 -08:00
Zach Loafman 4465068462 Remove system:anonymous check from kubectl test
This verbiage doesn't appear when the cluster is AlwaysAllow
2016-12-28 00:31:03 -08:00
Kubernetes Submit Queue 69ddd8eb27 Merge pull request #39247 from wojtek-t/optimize_controller_manager_memory
Automatic merge from submit-queue

Avoid unnecessary memory allocations

Low-hanging fruits in saving memory allocations. During our 5000-node kubemark runs I've see this:

ControllerManager:
- 40.17% k8s.io/kubernetes/pkg/util/system.IsMasterNode
- 19.04% k8s.io/kubernetes/pkg/controller.(*PodControllerRefManager).Classify

Scheduler:
- 42.74% k8s.io/kubernetes/plugin/pkg/scheduler/algrorithm/predicates.(*MaxPDVolumeCountChecker).filterVolumes

This PR is eliminating all of those.
2016-12-28 00:02:59 -08:00
CJ Cullen 345d652598 Tolerate a Forbidden error in e2e RBAC RoleBinding setup. 2016-12-27 20:11:14 -08:00
Wojciech Tyczynski d1292a7397 Optimize memory allocations in controller manager 2016-12-27 16:11:11 +01:00
Kubernetes Submit Queue a1265e0864 Merge pull request #37538 from resouer/fix-e2e-respect-id
Automatic merge from submit-queue

CreateNodeSelectorPods should respect parameter

Fix (1): `CreateNodeSelectorPods` should respect parameter `id`.

The existing e2e does not break because it happened use "node-selector" as id, which  is the same as the hard coded value.

Fix (2): The current `CreateNodeSelectorPods` does not use `nodeSelector` parameter, it hard coded a label instead.

The reason current e2e does not influenced because we happened use the same label: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/cluster_size_autoscaling.go#L177

Found these bugs during testing #36238
2016-12-27 04:43:46 -08:00
Kubernetes Submit Queue af54124f23 Merge pull request #35676 from krmayankk/contr-ref
Automatic merge from submit-queue (batch tested with PRs 39059, 39175, 35676, 38655)

ReplicaSet has onwer ref of the Deployment that created it

**What this PR does / why we need it**:
This enabled garbage collection for ReplicaSets and ensures they are owned by their respective Deployment objects.

fixes https://github.com/kubernetes/kubernetes/issues/33845

This is an initial PR to get feedback. Will update this quickly with unit tests if this seems like in the right direction
2016-12-22 18:50:32 -08:00
Kubernetes Submit Queue dba16d052c Merge pull request #39006 from fabianofranz/issues_38834
Automatic merge from submit-queue

In-cluster configs must take flag overrides into account

**What this PR does / why we need it**: Some flags must override in-cluster configs if provided to `kubectl` inside a cluster.

**Which issue this PR fixes**: Fixes https://github.com/kubernetes/kubernetes/issues/38834

**Release note**:
```release-note
Fixed a bug where the --server, --token, and --certificate-authority flags were not overriding the related in-cluster configs when provided in a `kubectl` call inside a cluster.
```
2016-12-22 17:42:27 -08:00
Mayank Kumar 777977612b ReplicaSet has owner ref of the Deployment that created it 2016-12-22 16:45:50 -08:00
deads2k 2444e0f270 tolerate missing subjectaccessreview in e2e 2016-12-22 14:03:57 -05:00
Fabiano Franz bdea92bccd In-cluster configs must take flag overrides into account 2016-12-22 14:22:01 -02:00
deads2k d9a4cfc09f fix e2e tests which use SAs for permissions 2016-12-21 16:25:32 -05:00
rkouj d405d041e3 Add e2e test to detach a pd whose node api object was deleted 2016-12-20 12:23:56 -08:00
Jon Cope da604ad9fa Made server images paths constant, removed redundant import alias 2016-12-20 14:11:38 -06:00
Jon Cope 30a296be82 camel case constants, tweak function documentation 2016-12-20 14:11:37 -06:00
Jon Cope a2b7193a09 minor fixes: changed string.Contains to mount | grep, nil pod, pv, pvc in AfterEach, set clientNodeIP in BeforeEach 2016-12-20 14:11:37 -06:00
Jon Cope 7d5305718d Add PV E2E: disruptive environment tests
Tweaked 'delete pod during stopped kubelet' test to check for mount

Refactor start, stop, restart funcs into 1 func
2016-12-20 14:11:37 -06:00
Kubernetes Submit Queue b3e57253cc Merge pull request #36009 from rkouj/GCE-PD-test
Automatic merge from submit-queue

Add test to detach a pd whose node was deleted

**What this PR does / why we need it**:
A test for the following issue :
If a node with a GCE PD attached is deleted (before the volume is detached), subsequent attempts by the attach/detach controller to detach it should not fail.


**Bonus** :Added additional code to ensure that the pd can still be attached to a different node.
Edit : Removed it as it was making the test much slower.

https://github.com/kubernetes/kubernetes/issues/29358
2016-12-19 20:24:02 -08:00
Kubernetes Submit Queue db5887aa83 Merge pull request #38891 from krousey/gceimageupgrade
Automatic merge from submit-queue (batch tested with PRs 38426, 38917, 38891, 38935)

Support different image during GCE node upgrade

**What this PR does / why we need it**: It lets GCE upgrade tests upgrade to a GCI node image.

**Which issue this PR fixes**: fixes #37855
2016-12-19 18:18:25 -08:00
Rajat Ramesh Koujalagi f67b4950c0 Add test to detach a pd whose node was deleted 2016-12-19 14:57:28 -08:00
Kris 3b5bf39cfa Support different image during GCE node upgrade 2016-12-19 13:18:50 -08:00
Kubernetes Submit Queue ce67a03b81 Merge pull request #38958 from jszczepkowski/ha-validation-fix
Automatic merge from submit-queue (batch tested with PRs 38942, 38958)

Added MULTIZONE flag to e2e remove master script.

Added MULTIZONE flag to e2e remove master script. The script is used by HA tests which set-up multizone cluster.
2016-12-19 08:45:45 -08:00
Kubernetes Submit Queue a366ca3732 Merge pull request #33837 from jsafrane/e2e-configmap
Automatic merge from submit-queue (batch tested with PRs 34353, 33837, 38878)

Add e2e test for configmap volume

There are two patches:
- refactor e2e volume tests to allow multiple volumes mounted into single pod
- add a test for ConfigMap volume mounted twice to test #28502
2016-12-19 06:42:58 -08:00
Kubernetes Submit Queue 377ad165a1 Merge pull request #34353 from copejon/gce-persistentvolume-testing
Automatic merge from submit-queue (batch tested with PRs 34353, 33837, 38878)

Gce persistentvolume testing

Add E2E PersistentVolume test for a GCE environment.  Tests that deleting a PV or PVC before the referencing pod does not fail on unmount and detach during pod deletion.
cc @jeffvance
2016-12-19 06:42:56 -08:00
Jerzy Szczepkowski 0c669fe6cc Added MULTIZONE flag to e2e remove master script.
Added MULTIZONE flag to e2e remove master script.
The script is used by HA tests which set-up multizone clusters.
2016-12-19 14:37:42 +01:00