Commit Graph

8856 Commits (32551a33222c80fa267cf57b2f6b2f691b63b003)

Author SHA1 Message Date
Kubernetes Submit Queue 2030730155 Merge pull request #53772 from xiangpengzhao/splitt-dapi-e2e
Automatic merge from submit-queue (batch tested with PRs 53507, 53772, 52903, 53543). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Split downward API e2e test case for pod/host IP into two

**What this PR does / why we need it**:
Split the test case in order to avoid version block pod IP e2e test.

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

**Special notes for your reviewer**:
/cc @timothysc @andrewsykim
2017-10-13 13:53:16 -07:00
Kubernetes Submit Queue ef841cc997 Merge pull request #53507 from vmware/cluster_ds_test
Automatic merge from submit-queue (batch tested with PRs 53507, 53772, 52903, 53543). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Adding e2e tests to verify vsphere volume lifecycle on a clustered datastore

**What this PR does / why we need it**:
This PR introduces tests for volume provisioning on a clustered datastore. It does so in three ways

1. Static provisioning (create vsphere volume and then create a pod with it)
2. Dynamic provisioning (specify clustered datastore in storage class parameters)
3. Dynamic provisioning with spbm policy (specify storage policy name in storage class parameters. This policy is a tag based policy and tagged to a clustered datastore)


**Which issue this PR fixes** : 
fixes vmware#278

**Special notes for your reviewer**:
Set env as per following example due to the need mentioned in description
```
export CLUSTER_DATASTORE="dscl1/sharedVmfs-1"
export VSPHERE_SPBM_POLICY_DS_CLUSTER="gold_cluster"
```
Internally reviewed by VMware reviewers @divyenpatel @BaluDontu @tusharnt
**Release note**:
```
None
```
2017-10-13 13:53:13 -07:00
Kubernetes Submit Queue 1ee617c871 Merge pull request #53542 from dashpole/priority_eviction
Automatic merge from submit-queue (batch tested with PRs 51840, 53542, 53857, 53831, 53702). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Kubelet Evictions take Priority into account

Issue: https://github.com/kubernetes/kubernetes/issues/22212
This implements the eviction strategy documented here: https://github.com/kubernetes/community/pull/1162, and discussed here: https://github.com/kubernetes/community/pull/846.
When priority is not enabled, all pods are treated as equal priority.

This PR makes the following changes:

1. Changes the eviction ordering strategy to (usage < requests, priority, usage - requests)
2. Changes unit testing to account for this change in eviction strategy (including tests where priority is disabled).
3. Adds a node e2e test which tests the eviction ordering of pods with different priorities.

/assign @dchen1107 @vishh 
cc @bsalamat @derekwaynecarr 

```release-note
Kubelet evictions take pod priority into account
```
2017-10-13 12:44:50 -07:00
Kubernetes Submit Queue c6b73933d6 Merge pull request #53792 from aleksandra-malinowska/autoscaling-test-fix-12
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use gcloud for enabling/disabling autoscaling in e2e tests

This removes temporary solution added in #28011 as it's no longer necessary. Should reduce flakes caused by not waiting for master restart after disabling autoscaling.
2017-10-13 09:43:21 -07:00
David Zhu 6d2e988e3b split configmap, downwardapi, and secrets, into two files each volume/non-volume and moved sig labels to front of the description string 2017-10-12 16:39:14 -07:00
Kubernetes Submit Queue f4d95b3f6d Merge pull request #53681 from krzyzacy/kubemark-bazel
Automatic merge from submit-queue (batch tested with PRs 47039, 53681, 53303, 53181, 53781). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Use bazel to build/push kubemark image

try to get some proof of concept, kubemark image is probably simple enough to get converted to bazel. (me bazel noob still trying it out locally)

cc @BenTheElder @ixdy @shyamjvs 

/release-note-none
2017-10-12 15:45:24 -07:00
David Ashpole 539fddb49d kubelet evictions take priority into account 2017-10-12 13:15:05 -07:00
Kubernetes Submit Queue 0b1da1fb37 Merge pull request #53119 from loburm/audit-e2e
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Improve e2e tests of audit logging.

Now test includes:
 * Verbs: create, list, watch, delete, get, update, patch.
 * Resources: pods, deployments, secrets, config maps, custom resource
 definition.
 * More fields: user, resource, level, stage, presence of request and
 response objects.

Fixes #49653
2017-10-12 07:36:44 -07:00
Kubernetes Submit Queue 1d4e1d2dc2 Merge pull request #52377 from MrHohn/gce-kube-up-create-manual-network
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

[GCE kube-up] Allow creating/deleting custom network

**What this PR does / why we need it**:
From https://github.com/kubernetes/test-infra/issues/4472.

This is the first step to make PR jobs use custom network instead of auto network (so that we will be less likely hitting subnetwork quota issue). 

The last commit is purely for testing out the changes on PR jobs. It will be removed after review.

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

**Special notes for your reviewer**:
/assign @bowei @nicksardo 

**Release note**:

```release-note
NONE
```
2017-10-12 02:55:28 -07:00
Marian Lobur 791bb89983 Improve e2e tests of audit logging.
Now test includes:
 * Verbs: create, list, watch, delete, get, update, patch.
 * Resources: pods, deployments, secrets, config maps, custom resource
 definition.
 * More fields: user, resource, level, stage, presence of request and
 response objects.
2017-10-12 10:02:16 +02:00
Kubernetes Submit Queue 0f5f82fa44 Merge pull request #53416 from krzyzacy/nodeconfig-path
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add a flag to customize config relative dir

So while migrating nodee2e configs to test-infra, I found out that I'd need to have a better support for [user-data](https://github.com/kubernetes/test-infra/blob/master/jobs/e2e_node/image-config.yaml#L11). However it's not wise to use an [absolute path](https://github.com/kubernetes/test-infra/blob/master/jobs/config.json#L9309), having the config dir to be configurable will be a better solution here, and as well for later on support run local node tests from test-infra.

Currently the job references to the image configs from test-infra, but read metadata from kubernetes, which is wrong :-\


/assign @yguo0905 @Random-Liu
2017-10-12 00:57:29 -07:00
xiangpengzhao 2528faa422 Split downward API e2e test case for pod/host IP into two 2017-10-12 15:48:02 +08:00
Sen Lu e0bcfd29ac Try to use bazel to build/push kubemark image 2017-10-11 22:11:36 -07:00
Kubernetes Submit Queue 8c8709d4de Merge pull request #53581 from Random-Liu/add-containerd-validation-node-e2e
Automatic merge from submit-queue (batch tested with PRs 53668, 53624, 52639, 53581, 51215). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add extra log and node env metadata support.

This PR:
1) Make log collection logic extensible via flags, so that we could collect more daemon logs in this PR. (e.g. `containerd.log` and `cri-containerd.log`)
2) Add extra node metadata from specified environment variable. (e.g. `PULL_REFS` in prow).

@krzyzacy I'll change the test-infra side soon. Let's discuss whether we should move/copy this code to test infra in your refactoring.

/cc @dchen1107 @yujuhong @abhi @mikebrow 

```release-note
NONE
```
2017-10-11 17:00:06 -07:00
Kubernetes Submit Queue 67e9add546 Merge pull request #53624 from msau42/local-e2e
Automatic merge from submit-queue (batch tested with PRs 53668, 53624, 52639, 53581, 51215). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Local e2e test fixes

**What this PR does / why we need it**:
1. Remove tests using TestContainerOutput because they don't wait for unmount
2. Fix scheduling error test to handle updated event msgs.

@kubernetes/sig-storage-pr-reviews 

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

**Release note**:

NONE
2017-10-11 17:00:00 -07:00
Kubernetes Submit Queue 8db9372ecf Merge pull request #53668 from cblecker/e2e-dns
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Bump kube-dns version used in e2e

**What this PR does / why we need it**: Updates the version of kube-dns used in the e2e network tests.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-10-11 16:12:38 -07:00
pshahzeb e71d38aead Tests to verify volume provisioning on a clustered datastore 2017-10-11 15:31:35 -07:00
Kubernetes Submit Queue 7db90f8b87 Merge pull request #53088 from mtaufen/remove-experimental-deprecated-kubeletconfig
Automatic merge from submit-queue (batch tested with PRs 53204, 53364, 53559, 53589, 53088). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Mulligan: Remove deprecated and experimental fields from KubeletConfiguration

Revert "Merge pull request #51857 from kubernetes/revert-51307-kc-type-refactor"

This reverts commit 9d27d92420, reversing
changes made to 2e69d4e625.

See original: #51307

We punted this from 1.8 so it could go through an API review. The point
of this PR is that we are trying to stabilize the kubeletconfig API so
that we can move it out of alpha, and unblock features like Dynamic
Kubelet Config, Kubelet loading its initial config from a file instead
of flags, kubeadm and other install tools having a versioned API to rely
on, etc.

We shouldn't rev the version without both removing all the deprecated
junk from the KubeletConfiguration struct, and without (at least
temporarily) removing all of the fields that have "Experimental" in
their names. It wouldn't make sense to lock in to deprecated fields.
"Experimental" fields can be audited on a 1-by-1 basis after this PR,
and if found to be stable (or sufficiently alpha-gated), can be restored
to the KubeletConfiguration without the "Experimental" prefix.

Related issue: https://github.com/kubernetes/kubernetes/issues/53084

**Release note**:
```release-note
NONE
```

/cc @kubernetes/api-reviewers
2017-10-11 15:14:47 -07:00
Kubernetes Submit Queue 49b4a514d8 Merge pull request #53080 from jennybuckley/podpresets-test-skip
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Skip podpreset test if the alpha feature setttings/v1alpha1 is disabled

**What this PR does / why we need it**: Skip this test if it is not able to find the requested resource, so the test does not consistently fail.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Skip podpreset test if the alpha feature setttings/v1alpha1 is disabled
```
2017-10-11 13:36:55 -07:00
Michael Taufen 8180536bed Mulligan: Remove deprecated and experimental fields from KubeletConfiguration
Revert "Merge pull request #51857 from kubernetes/revert-51307-kc-type-refactor"

This reverts commit 9d27d92420, reversing
changes made to 2e69d4e625.

See original: #51307

We punted this from 1.8 so it could go through an API review. The point
of this PR is that we are trying to stabilize the kubeletconfig API so
that we can move it out of alpha, and unblock features like Dynamic
Kubelet Config, Kubelet loading its initial config from a file instead
of flags, kubeadm and other install tools having a versioned API to rely
on, etc.

We shouldn't rev the version without both removing all the deprecated
junk from the KubeletConfiguration struct, and without (at least
temporarily) removing all of the fields that have "Experimental" in
their names. It wouldn't make sense to lock in to deprecated fields.
"Experimental" fields can be audited on a 1-by-1 basis after this PR,
and if found to be stable (or sufficiently alpha-gated), can be restored
to the KubeletConfiguration without the "Experimental" prefix.
2017-10-11 09:52:39 -07:00
Kubernetes Submit Queue 34ceb5bc97 Merge pull request #53664 from gnufied/fix-volume-detach-metric-flake
Automatic merge from submit-queue (batch tested with PRs 51677, 53690, 53025, 53717, 53664). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix flake for volume detach metrics

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

cc @kubernetes/sig-storage-pr-reviews @msau42
2017-10-11 09:35:36 -07:00
Kubernetes Submit Queue df072ca97e Merge pull request #53025 from mtaufen/feature-gate-map
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make feature gates loadable from a map[string]bool

Command line flag API remains the same. This allows ComponentConfig             
structures (e.g. KubeletConfiguration) to express the map structure             
behind feature gates in a natural way when written as JSON or YAML.             
                                                                                
For example:                                                                    
                                                                                
KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```

Fixes: #53024

```release-note
The Kubelet's feature gates are now specified as a map when provided via a JSON or YAML KubeletConfiguration, rather than as a string of key-value pairs.
```

/cc @mikedanese @jlowdermilk @smarterclayton
2017-10-11 09:05:33 -07:00
Hemant Kumar 6f0c98bed8 Fix flake for volume detach metrics 2017-10-11 09:45:06 -04:00
Aleksandra Malinowska 0078c64d9e Use gcloud for enabling/disabling autoscaling in e2e tests 2017-10-11 15:21:35 +02:00
Kubernetes Submit Queue 0564d52985 Merge pull request #53205 from kawych/master
Automatic merge from submit-queue (batch tested with PRs 50223, 53205). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create e2e tests for Custom Metrics - Stackdriver Adapter and HPA based on custom metrics from Stackdriver

**What this PR does / why we need it**:
- Add e2e test for Custom Metrics - Stackdriver Adapter
- Add 2e2 test for HPA based on custom metrics from Stackdriver
- Enable HorizontalPodAutoscalerUseRESTClients option

**Release note**:

```release-note
Horizontal pod autoscaler uses REST clients through the kube-aggregator instead of the legacy client through the API server proxy.
```
2017-10-11 03:54:33 -07:00
Kubernetes Submit Queue 1797255cd2 Merge pull request #53380 from soltysh/issue35507
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Increase backoffLimit for job that we expect to fail several times

**What this PR does / why we need it**:
Since the introduction of `backoffLimit` for a job that single test failed majority of times on: `BackoffLimitExceeded: Job has reach the specified backoff limit`. 
I'm bumping this to 999, so that it has enough room to fail several times.

**Which issue this PR fixes**:
Fixes #35507.

**Special notes for your reviewer**:

**Release note**:
```release-note
None
```
2017-10-10 19:27:52 -07:00
Kubernetes Submit Queue 3ac4762db9 Merge pull request #53673 from timothysc/downward_hostip_e2e
Automatic merge from submit-queue (batch tested with PRs 53678, 53677, 53682, 53673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix to prevent downward api change break on older versions

Signed-off-by: Timothy St. Clair <timothysc@gmail.com>

**What this PR does / why we need it**:
Prevents "should provide pod and host IP as an env var [Conformance]" from running on older versions whose api does not have that field and will break on those clusters. 

This is not a upstream tested configuration, but downstream folks do this regularly.  

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

**Special notes for your reviewer**:
N/A

**Release note**:

```
Prevent downward api-change from breaking on older version
```

/cc @kubernetes/sig-testing-bugs @jpbetz  @marun
2017-10-10 18:36:08 -07:00
Kubernetes Submit Queue 7165733037 Merge pull request #53677 from janetkuo/sts-e2e-typo
Automatic merge from submit-queue (batch tested with PRs 53678, 53677, 53682, 53673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix typo in StatefulSet e2e test

Found it while reviewing #53218

**Release note**:

```release-note
NONE
```
2017-10-10 18:36:02 -07:00
Random-Liu 6d132e8e18 Add extra log and node env support.
Signed-off-by: Random-Liu <taotaotheripper@gmail.com>
2017-10-10 18:07:08 -07:00
Kubernetes Submit Queue e8e72a4444 Merge pull request #53537 from jeffvance/pod-delete
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

wait for pod to be fully deleted

**What this PR does / why we need it**:
Fix flaky glusterfs io-streaming tests.

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

**Special notes for your reviewer**:
1) max potential wait for complete pod deletion is ~~15m~~ 5m.
2) ~~removed [Flaky] from HostCleanup, _e2e/node/kubelet.go_ since pod deletion is reliable now.~~
3) ~~added tag [Slow] to HostCleanup due to long max wait for pod deletion.~~

After all CI tests run reliably we can consider removing the [Flaky] tag (2, above), or do that in a separate pr.

```release-note
NONE
```
cc @msau42
2017-10-10 16:39:29 -07:00
Kubernetes Submit Queue 0d101846ce Merge pull request #53551 from mml/emit-version
Automatic merge from submit-queue (batch tested with PRs 52354, 52949, 53551). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add client and server versions to the e2e.test output.

Fixes #53502.

```release-note
NONE
```

Sample output:
```
Oct  6 15:02:44.001: INFO: Client version: v1.9.0-alpha.1.737+3b1b19a1e2a9a4-dirty
Oct  6 15:02:44.039: INFO: Server version: v1.8.0
```

/assign @timothysc
2017-10-10 15:45:32 -07:00
Kubernetes Submit Queue 23cc4dc50a Merge pull request #52949 from smarterclayton/enable_paging
Automatic merge from submit-queue (batch tested with PRs 52354, 52949, 53551). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Enable API chunking and promote to beta for 1.9

All list watchers default to using chunking.  The server by default fills pages to avoid low cardinality filters from making excessive numbers of requests.  Fix an issue with continuation tokens where a `../` could be used if the feature was enabled.

```release-note
API chunking via the `limit` and `continue` request parameters is promoted to beta in this release.  Client libraries using the Informer or ListWatch types will automatically opt in to chunking.
```
2017-10-10 15:45:29 -07:00
Janet Kuo 925473117f Fix typo in StatefulSet e2e test 2017-10-10 14:19:31 -07:00
Timothy St. Clair db7cb5f7fd Fix to prevent downward api change break on older versions
Signed-off-by: Timothy St. Clair <timothysc@gmail.com>
2017-10-10 15:32:01 -05:00
jeff vance d7e18ac5d0 wait for pod to be fully deleted 2017-10-10 10:58:50 -07:00
Christoph Blecker 90c1a1e8b3
Bump kube-dns version used in e2e 2017-10-10 10:49:54 -07:00
Michael Taufen 131b419596 Make feature gates loadable from a map[string]bool
Command line flag API remains the same. This allows ComponentConfig
structures (e.g. KubeletConfiguration) to express the map structure
behind feature gates in a natural way when written as JSON or YAML.

For example:

KubeletConfiguration Before:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates: "DynamicKubeletConfig=true,Accelerators=true"
```

KubeletConfiguration After:
```
apiVersion: kubeletconfig/v1alpha1
kind: KubeletConfiguration
featureGates:
  DynamicKubeletConfig: true
  Accelerators: true
```
2017-10-10 09:37:51 -07:00
Kubernetes Submit Queue aaf14d4619 Merge pull request #53525 from sttts/sttts-scheme-copier-romoval
Automatic merge from submit-queue (batch tested with PRs 53525, 53652). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

apimachinery: remove ObjectCopier interface(s)

The big commit is a mechanical, transitive removal of the copier interfaces in all structs and function calls.
2017-10-10 08:31:41 -07:00
Clayton Coleman da7124e5e5
Fill partial pages on the server rather than forcing client to
The etcd3 storage now attempts to fill partial pages to prevent clients
having to make more round trips (latency from server to etcd is lower
than client to server). The server makes repeated requests to etcd of
the current page size, then uses the filter function to eliminate any
matches. After this change the apiserver will always return full pages,
but we leave the language in place that clients must tolerate it.

Reduces tail latency of large filtered lists, such as viewing pods
assigned to a node.
2017-10-10 09:11:44 -04:00
Kubernetes Submit Queue c381022273 Merge pull request #52067 from crimsonfaith91/revamp
Automatic merge from submit-queue (batch tested with PRs 53444, 52067, 53571, 53182). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

revamp replicaset integration tests

**What this PR does / why we need it**:
This PR revamps existing replicaset integration tests. Some unit tests have been converted to integration tests.

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

**Release note**:

```release-note
NONE
```

**TODO List**:
- [x] add an integration test to verify scale endpoint works
- [ ] convert testReplicaSetConditionCheck() to integration test, and modify the test as replicaset's condition has been removed
- [ ] ~~HPA-related replicaset integration test (may be better suited under HPA integration tests)~~
- [x] verify all tests from "Suggested unit tests to retain" list of the internal doc will not be converted to integration tests, or convert the tests accordingly
- [ ] ~~refactor sync call tree (refer deployment and daemonset PRs)~~
- [x] further improve written integration tests (revise test strategies, remove redundant GET / UPDATE calls, add more relevant sub-tests)
- [x] remove unit tests that have overlapping testing goals with written integration tests
2017-10-10 00:33:23 -07:00
Kubernetes Submit Queue 6933b5ad15 Merge pull request #52320 from crimsonfaith91/rs-e2e
Automatic merge from submit-queue (batch tested with PRs 53621, 52320, 53625). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

revamp replicaset e2e tests

**What this PR does / why we need it**:
This PR removes some replicaset e2e tests as they will be converted to integration tests:
(1) condition check test
(2) pod adoption test
(3) pod release(orphaning) test

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

**Release note**:

```release-note
NONE
```
2017-10-09 19:48:18 -07:00
Jun Xiang Tee b37f69e95f revamp replicaset integration tests 2017-10-09 17:14:08 -07:00
Michelle Au 697e78565c Update search string for failed scheduling 2017-10-09 16:10:31 -07:00
Kubernetes Submit Queue c7f970c560 Merge pull request #49593 from gunjan5/np-e2e
Automatic merge from submit-queue (batch tested with PRs 53567, 53197, 52944, 49593). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Refactor network policy e2e tests, and add additional logging when tests fail

**What this PR does / why we need it**:
- Restructure tests, clean up duplicate code
- Add additional logging, so it's easier to debug when the tests fail
- Add retry on the client side pods because sometimes kubelet will start the pod when the network is not ready, resulting in flaky tests
- Add readiness probe for the server pods to further reduce the flakiness.

Current failure messages when a test fails:
```
checking client-can-connect could communicate with server.
  Expected error:
      <*errors.errorString | 0xc420868820>: {
          s: "pod \"client-can-connect\" failed with status: {Phase:Failed Conditions:[{Type:Initialized Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:48 -0700 PDT Reason: Message:} {Type:Ready Status:False LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:57 -0700 PDT Reason:ContainersNotReady Message:containers with unready status: [client-can-connect-container]} {Type:PodScheduled Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:48 -0700 PDT Reason: Message:}] Message: Reason: HostIP:10.138.0.2 PodIP:10.60.1.180 StartTime:2017-07-25 15:54:48 -0700 PDT InitContainerStatuses:[] ContainerStatuses:[{Name:client-can-connect-container State:{Waiting:nil Running:nil Terminated:&ContainerStateTerminated{ExitCode:1,Signal:0,Reason:Error,Message:,StartedAt:2017-07-25 15:54:49 -0700 PDT,FinishedAt:2017-07-25 15:54:57 -0700 PDT,ContainerID:docker://c91c33139672c20a5231bcba9437d74e12d35a6d19275b41bb8e571148b4ab57,}} LastTerminationState:{Waiting:nil Running:nil Terminated:nil} Ready:false RestartCount:0 Image:gcr.io/google_containers/redis:e2e ImageID:docker://sha256:e5e67996c442f903cda78dd983ea6e94bb4e542950fd2eba666b44cbd303df42 ContainerID:docker://c91c33139672c20a5231bcba9437d74e12d35a6d19275b41bb8e571148b4ab57}] QOSClass:BestEffort}",
      }
      pod "client-can-connect" failed with status: {Phase:Failed Conditions:[{Type:Initialized Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:48 -0700 PDT Reason: Message:} {Type:Ready Status:False LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:57 -0700 PDT Reason:ContainersNotReady Message:containers with unready status: [client-can-connect-container]} {Type:PodScheduled Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-07-25 15:54:48 -0700 PDT Reason: Message:}] Message: Reason: HostIP:10.138.0.2 PodIP:10.60.1.180 StartTime:2017-07-25 15:54:48 -0700 PDT InitContainerStatuses:[] ContainerStatuses:[{Name:client-can-connect-container State:{Waiting:nil Running:nil Terminated:&ContainerStateTerminated{ExitCode:1,Signal:0,Reason:Error,Message:,StartedAt:2017-07-25 15:54:49 -0700 PDT,FinishedAt:2017-07-25 15:54:57 -0700 PDT,ContainerID:docker://c91c33139672c20a5231bcba9437d74e12d35a6d19275b41bb8e571148b4ab57,}} LastTerminationState:{Waiting:nil Running:nil Terminated:nil} Ready:false RestartCount:0 Image:gcr.io/google_containers/redis:e2e ImageID:docker://sha256:e5e67996c442f903cda78dd983ea6e94bb4e542950fd2eba666b44cbd303df42 ContainerID:docker://c91c33139672c20a5231bcba9437d74e12d35a6d19275b41bb8e571148b4ab57}] QOSClass:BestEffort}
  not to have occurred
```

Failure message with this PR:
```
 should support a 'default-deny' policy [Feature:NetworkPolicy] [It]
    /Users/gunjan/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/network/network_policy.go:81

    Jul 25 14:35:55.978: Pod client-cannot-connect should be able to connect to service svc-server, but was not able to connect.
    Pod logs:
    Connecting to svc-server.e2e-tests-network-policy-tbzm8:80 (10.63.254.124:80)
    wget: download timed out
    Connecting to svc-server.e2e-tests-network-policy-tbzm8:80 (10.63.254.124:80)
    wget: download timed out
    Connecting to svc-server.e2e-tests-network-policy-tbzm8:80 (10.63.254.124:80)
    wget: download timed out
    Connecting to svc-server.e2e-tests-network-policy-tbzm8:80 (10.63.254.124:80)
    wget: download timed out
    Connecting to svc-server.e2e-tests-network-policy-tbzm8:80 (10.63.254.124:80)
    wget: download timed out


   Current NetworkPolicies:
    	[{{ } {deny-all  e2e-tests-network-policy-tbzm8 /apis/networking.k8s.io/v1/namespaces/e2e-tests-network-policy-tbzm8/networkpolicies/deny-all 20fa92ab-7181-11e7-855b-42010a8a0003 87694 1 2017-07-25 14:35:07 -0700 PDT <nil> <nil> map[] map[] [] nil [] } {{map[] []} []}}]

   Pods:
    	[Pod: server, Status: &PodStatus{Phase:Running,Conditions:[{Initialized True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:34:52 -0700 PDT  } {Ready True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:35:00 -0700 PDT  } {PodScheduled True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:34:52 -0700 PDT  }],Message:,Reason:,HostIP:10.138.0.2,PodIP:10.60.1.145,StartTime:2017-07-25 14:34:52 -0700 PDT,ContainerStatuses:[{server-container-80 {nil ContainerStateRunning{StartedAt:2017-07-25 14:34:53 -0700 PDT,} nil} {nil nil nil} true 0 gcr.io/google_containers/porter:4524579c0eb935c056c8e75563b4e1eda31587e0 docker://sha256:711ccbc1c74f3417f2a0f403c194017b3bde09eec3c3b42dc9c838db3894c223 docker://3fa73da57380ef28520f8bbf53b3540f523ab76d45a1b42cc9a1e4573eb45639}],QOSClass:BestEffort,InitContainerStatuses:[],}
     Pod: server, Status: &PodStatus{Phase:Running,Conditions:[{Initialized True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:34:52 -0700 PDT  } {Ready True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:35:00 -0700 PDT  } {PodScheduled True 0001-01-01 00:00:00 +0000 UTC 2017-07-25 14:34:52 -0700 PDT  }],Message:,Reason:,HostIP:10.138.0.2,PodIP:10.60.1.145,StartTime:2017-07-25 14:34:52 -0700 PDT,ContainerStatuses:[{server-container-80 {nil ContainerStateRunning{StartedAt:2017-07-25 14:34:53 -0700 PDT,} nil} {nil nil nil} true 0 gcr.io/google_containers/porter:4524579c0eb935c056c8e75563b4e1eda31587e0 docker://sha256:711ccbc1c74f3417f2a0f403c194017b3bde09eec3c3b42dc9c838db3894c223 docker://3fa73da57380ef28520f8bbf53b3540f523ab76d45a1b42cc9a1e4573eb45639}],QOSClass:BestEffort,InitContainerStatuses:[],}
    ]
```
**Release note**:

```release-note
NONE
```
2017-10-09 11:18:52 -07:00
Kubernetes Submit Queue fb808183f8 Merge pull request #52944 from mattjmcnaughton/mattjmcnaughton/clean-up-cluster_size_autoscaling
Automatic merge from submit-queue (batch tested with PRs 53567, 53197, 52944, 49593). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Clean up in `cluster_size_autoscaling.go`

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

Fix `golint` errors.

**Release note**:
```release-note
NONE
```
2017-10-09 11:18:50 -07:00
Michelle Au ce19dda57a Remove local PV tests using TestContainerOutput because it doesn't wait for unmount 2017-10-09 09:50:59 -07:00
Matt Liggett 2c9c45ca4e Add client and server versions to the e2e.test output.
Fixes #53502.
2017-10-09 09:24:35 -07:00
Kubernetes Submit Queue a3103ec940 Merge pull request #53334 from bskiba/ca_km_clean
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add launching Cluster Autoscaler in Kubemark

**What this PR does / why we need it**:
Allows to launch Cluster Autoscaler in Kubemark. 
To do it, set ENABLE_KUBEMARK_CLUSTER_AUTOSCALER flag to true. This currently only works with one nodegroup, for which you can specify minimum and maximum number of nodes and name. (KUBEMARK_AUTOSCALER_MIN_NODES, KUBEMARK_AUTOSCALER_MAX_NODES, KUBEMARK_AUTOSCALER_MIG_NAME).
Is is important to note that NUM_NODES has a different meaning when launching Cluster Autoscaler - we always start with only one node, but NUM_NODES is used to calculate the size of Kubemark master and addon components.

There are no changes to the current setup if ENABLE_KUBEMARK_CLUSTER_AUTOSCALER is set to false.

**Release note**:
```
NONE
```
2017-10-09 08:20:53 -07:00
mattjmcnaughton 5ea2914a03 Clean up in `cluster_size_autoscaling.go`
Fix `golint` errors in `cluster_size_autoscaling.go`.
2017-10-09 08:58:11 -04:00
Aleksandra Malinowska 73a1227f39 Avoid unnecessary gcloud call if test was skipped 2017-10-09 11:35:11 +02:00