Commit Graph

148 Commits (83ad4d9e96e77a87434a43e475a653c3c64f48ff)

Author SHA1 Message Date
Walter Fender 02bd75764c Issue 63622 - Flaky e2e/aggr test.
Investigated issue 63622. The test usually passes. When it does it seems
to take almost 30 seconds for the sample-apiserver to start returning
2xx rather than 4xx to flunder requests. On the failing tests I looked
at it was taking almost 45 seconds for the sample-apiserver to become
healthy. I bumped the wait/timeout in the test for this case to 60
seconds. I also added a log statement to make it easier to track how
long it was taking for the sample-apiserver to come up. Once we have a
bit more history I will log a bug for the long start up time.
Fixed go format error.
2018-06-11 16:05:08 -07:00
Kubernetes Submit Queue ccb9590a3b
Merge pull request #63386 from roycaihw/gc-json-patch
Automatic merge from submit-queue (batch tested with PRs 63386, 64624, 62297, 64847). 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>.

Let the garbage collector use json merge patch when SMP is not supported

**What this PR does / why we need it**:
Let garbage collector fallback to use json merge patch when strategic merge patch returns 415. This enables orphan delete on custom resources. 

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

**Special notes for your reviewer**:
This PR is developed based on https://github.com/kubernetes/kubernetes/pull/56595. Ref https://github.com/kubernetes/kubernetes/pull/56606 for more information. 

**Release note**:

```release-note
Orphan delete is now supported for custom resources
```

/sig api-machinery
2018-06-06 19:56:20 -07:00
Kubernetes Submit Queue 6c89575481
Merge pull request #60671 from jennybuckley/gc-test-error-message
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>.

Fix error handling in gc e2e test

**What this PR does / why we need it**:
Error messages were not being surfaced in log of GC e2e test, part of fixing #60463
2018-06-04 22:11:12 -07:00
Chao Xu 29d72a7134 GC fallback to jsonmerge patch when SMP is not supported 2018-06-01 16:50:07 -07:00
Kubernetes Submit Queue 0ea07c4030
Merge pull request #64587 from liggitt/debug-aggregator
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 debugging for aggregator flake

capture current state of the APIService and extension server pod for output in failure cases

xref https://github.com/kubernetes/kubernetes/issues/63622

```release-note
NONE
```
2018-05-31 23:43:33 -07:00
Jordan Liggitt e680780424
add debugging for aggregator flake 2018-05-31 20:35:52 -04:00
jennybuckley 7a1b8eaae3 Promote watch e2e test to conformance 2018-05-30 00:13:57 -07:00
Kubernetes Submit Queue deb632e727
Merge pull request #64204 from sttts/sttts-unify-NewNoxuInstance
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>.

apiextensions: unify mono- and multi-versioned test helpers

The mono-versioned helpers are a special case of the multi-versioned ones.

Fixes part of https://github.com/kubernetes/kubernetes/issues/64136.
2018-05-25 04:49:37 -07:00
Dr. Stefan Schimanski 818147d6fb apiextensions: make CreateNewCustomResourceDefinition return created CRD 2018-05-23 21:41:55 +02:00
Anthony Yeh 436db71751
Set explicit labels/selector for apps/v1 Deployment/RS. 2018-05-22 13:43:07 -07:00
Anthony Yeh a6a5190494
test/e2e: Use apps/v1 Deployment/ReplicaSet.
This must be done at the same time as the controller update,
since they share code.
2018-05-22 13:43:06 -07:00
David Eads fd044d152e fix dynamic client name 2018-05-11 13:12:09 -04:00
Kubernetes Submit Queue bed4531131
Merge pull request #61913 from jennybuckley/watch-pod-deadline
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>.

Remove ActiveDeadlineSeconds from Watch e2e Test

**What this PR does / why we need it**:
I originally updated ActiveDeadlineSeconds because it is one of the few fields on Pods which can change, but I didn't consider how it might affect the reliability of the test. This PR replaces the update done to ActiveDeadlineSeconds with a more predictable update to a label.

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

**Release note**:
```release-note
NONE
```
2018-05-10 10:50:19 -07:00
Jordan Liggitt adfe0ab52f
Make aggregator e2e test resilient to unrelated API group changes 2018-05-09 18:06:02 -04:00
David Eads 5ff923c7f9 make dynamic client slightly easier to use 2018-04-30 08:54:30 -04:00
xuzhonghu 393324497f make use of simple dynamic client in test 2018-04-27 13:38:58 +08:00
Kubernetes Submit Queue ce1cab3bfa
Merge pull request #62350 from jennybuckley/crd-tests-flaky
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>.

 Fix flaky crd e2e tests

Fixes #62345

/sig api-machinery
/kind flake
/priority failing-test

From the issue:
> All the tests that rely on creating a CustomResourceDefinition are flaky. This is because the test "AdmissionWebhook Should be able to deny custom resource creation" creates a validating webhook, called deny-crd.k8s.io, which denies all crd creations. This is an issue for any other test which will create a crd that gets run in parallel with that webhook test, causing them to fail with the message failed to create CustomResourceDefinition: admission webhook "deny-crd.k8s.io" denied the request: this webhook denies all requests

This PR changes the test webhook image to support handling a new "/crd" path which would accept and deny crd creations based on their labels, only denying if if the object has the label ```"webhook-e2e-test":"webhook-disallow"```, and updates the "AdmissionWebhook Should be able to deny custom resource creation" test to use that label.

**Release note**:
```release-note
NONE
```
2018-04-13 09:28:44 -07:00
Joe Betz a795cb61bc Bump etcd default server version to 3.2.18 2018-04-11 21:12:44 -07:00
jennybuckley 7fee22b7be Fix flaky crd e2e tests 2018-04-11 14:08:05 -07:00
Manjunath A Kumatagi 1bb810e749 Use pause manifest image 2018-04-06 11:00:50 +05:30
jennybuckley 3fcc269733 Cleanup CRD/CR confusion in webhook e2e tests 2018-04-03 15:14:30 -07:00
Kubernetes Submit Queue 6c96dfd81e
Merge pull request #61025 from ayushpateria/crd_watch_e2e
Automatic merge from submit-queue (batch tested with PRs 61404, 61025). 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 e2e test for CRD Watch

**What this PR does / why we need it**:
This adds an e2e test to watch for custom resources. 
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #55538

**Special notes for your reviewer**:
This PR depends on some functions from #60331, and shouldn't be merged before that one gets merged.
**Release note**:

```release-note
Add e2e test for CRD Watch
```
2018-04-03 07:31:08 -07:00
hzxuzhonghu 932a072990 add e2e case for crd webhook 2018-04-03 20:42:44 +08:00
Ayush Pateria 121bc9c838 Seperate timer durations for expectEvent and expectNoEvent 2018-04-02 19:42:12 +05:30
Ayush Pateria cbdbcb515b Add e2e test for CRD Watch 2018-04-02 19:40:36 +05:30
jennybuckley 0c37b630e8 Remove ActiveDeadlineSeconds from watch e2e test 2018-03-29 12:11:06 -07:00
Mikhail Mazurskiy c23a8a85cc
Use range in loops; misc fixes 2018-03-29 22:55:25 +11:00
Kubernetes Submit Queue 2919818da8
Merge pull request #61499 from jennybuckley/crd-test-flake
Automatic merge from submit-queue (batch tested with PRs 61378, 60915, 61499, 61507, 61478). 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 "Garbage collector should support cascading deletion of custom resources" flake

**What this PR does / why we need it**:
These webhook configuration objects were intended to have no effect on admission requests, and are just used to ensure that webhook configuration objects can always be deleted.

However, I think they are causing an entirely separate test to flake (Garbage collector should support cascading deletion of custom resources) because of the interaction between these two webhooks, which are run on all admission requests, and #61355 (Unable to create/update CRD when mutating webhook configured) when the two tests are run at around the same time.

This PR will make the effects of the webhook e2e test on other tests easier to reason about.

The flakiness is being caused by a legitimate failure of the underlying code (That CRDs currently don't work with webhooks), but not a failure which either of "Garbage collector should support cascading deletion of custom resources" or "AdmissionWebhooks Should not be able to prevent deleting validating-webhook-configurations or mutating-webhook-configurations" is supposed to reliably catch.

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

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

/sig api-machinery
/kind flake
2018-03-22 07:15:26 -07:00
jennybuckley cd06e4db1f Remove wildcard matching of no-op test webhooks 2018-03-21 15:13:43 -07:00
Ryan Hitchman f7da809209 Increase API watch test timeout to avoid flakes. 2018-03-21 13:26:49 -07:00
Kubernetes Submit Queue 2cb4297c96
Merge pull request #59637 from hanxiaoshuai/bugfix0209
Automatic merge from submit-queue (batch tested with PRs 59637, 60611, 60788, 60489, 60687). 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 todo: use a better way to keep this label unique in the test

**What this PR does / why we need it**:
fix todo: use a better way to keep this label unique in the test in test/e2e/apimachinery/garbage_collector.go
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-20 04:34:31 -07:00
Kubernetes Submit Queue c0db49c2cb
Merge pull request #60331 from jennybuckley/watch-e2e-test
Automatic merge from submit-queue (batch tested with PRs 60457, 60331, 54970, 58731, 60562). 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 e2e test for watch

**What this PR does / why we need it**:
Currently watch is only tested by kubectl tests, but all clients of kubernetes should be able to reliably watch resources for changes. This test should be able to accommodate testing watch for custom resources without many changes.

/sig api-machinery

```release-note
Added e2e test for watch
```
2018-03-19 23:42:11 -07:00
jennybuckley 5f518e6d4c Fix error handling in gc e2e test 2018-03-14 10:27:44 -07:00
jennybuckley 3b2472a305 Add e2e test for watch 2018-03-12 10:48:43 -07:00
Joe Betz e2a25f9b54 Bump to etcd 3.1.12 to pick up critical fix 2018-03-09 14:28:23 -08:00
Shyam Jeedigunta 21f5e69f08 Rollback etcd server version to 3.1.11 due to #60589 2018-03-08 13:07:15 +01:00
Kubernetes Submit Queue 9aae9b58a5
Merge pull request #59836 from jpbetz/etcd-3.2.16-patch-upgrade
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 etcd server patch version to 3.2.16

etcd 3.2.16 contains a critical fix for HA clusters: https://github.com/coreos/etcd/pull/9281

Also, update newly added tests to use `REGISTRY` make variable.

Release note:
```release-note
Upgrade the default etcd server version to 3.2.16
```
2018-03-06 10:00:53 -08:00
Kubernetes Submit Queue 7e98a3ad7c
Merge pull request #60797 from soltysh/issue60765
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>.

Run server-side print tests only on k8s 1.10+

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

**Release note**:
```release-note
None
```

/assign @smarterclayton @deads2k 
@juanvallejo fyi
2018-03-06 02:12:40 -08:00
jennybuckley 58b43ad27d Prevent webhooks from affecting admission requests for webhooks 2018-03-05 16:35:52 -08:00
Joe Betz 04c6d0ab26 Bump etcd server patch version to 3.2.16 2018-03-05 13:58:51 -08:00
Maciej Szulik 64abf5b8ad
Run server-side print tests only on k8s 1.10+ 2018-03-05 17:52:51 +01:00
hangaoshuai ebec856cd3 fix todo: use a better way to keep this label unique in the tests 2018-03-02 09:33:43 +08:00
Kubernetes Submit Queue 6546b69964
Merge pull request #60116 from jennybuckley/gc-conf-test
Automatic merge from submit-queue (batch tested with PRs 60430, 60115, 58052, 60355, 60116). 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 Garbage Collector e2e conformance tests

**What this PR does / why we need it**:
The garbage collector is a core component of kubernetes and needs to be tested by conformance, so its functionality can be relied on in any kubernetes environment.

As we can see in [testgrid](https://k8s-testgrid.appspot.com/sig-api-machinery#gce), the garbage collector tests being promoted by this PR are consistently passing. And the intention to promote them to conformance tests was laid out by [this document](https://docs.google.com/document/d/1h2S9ff9N-4MKqfayE3A8TqjD_qIwuND_dAhOAJFxYS0)

**Special notes for your reviewer**:
The last two tests in this file are not added as conformance tests because they involve beta features (custom resources and cronjobs), and conformance tests are only allowed for features in GA.

**Release note**:
```release-note
New conformance tests added for the Garbage Collector
```
2018-02-27 09:38:51 -08:00
jennybuckley e6f867d2ca promote GC e2e tests to conformance tests 2018-02-26 11:18:12 -08:00
Clayton Coleman 98cf7e6ae2
generated: bazel 2018-02-22 23:26:25 -05:00
Clayton Coleman 110b064d63
Make Service storage a wrapper around other storages
The registry abstraction is unnecessary and adds direct coupling to the
core types. By using a wrapper, we carry through the default
implementations of the non-mutating operations. The DeleteCollection
method is explicitly patched out since it cannot be correctly
implemented on the storage currently.

As a result, TableConvertor is now exposed.

A few other minor refactorings

* Corrected the case of some variables
* Used functions instead of methods for several helper methods
* Removed the legacy Deleter - service was the only remaining consumer
2018-02-22 23:26:25 -05:00
Kubernetes Submit Queue be87ea1566
Merge pull request #59010 from cheftako/webhook-crd
Automatic merge from submit-queue (batch tested with PRs 59010, 59212, 59281, 59014, 59297). 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 flaky AdmissionWebhook e2e-crd tests

**What this PR does / why we need it**: Several of the tests("It") in the e2e suite reuse the CRD.
However they each try to setup and tear down the CRD independently.
Since these tests can be running in parallel, causing intermittant
failures.
Changes the test to set up one shared CRD and reuse.

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

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2018-02-07 15:27:37 -08:00
Walter Fender 0bdf29801c Fix flaky AdmissionWebhook e2e-crd tests
Several of the tests("It") in the e2e suite reuse the CRD.
However they each try to setup and tear down the CRD independently.
Since these tests can be running in parallel, causing intermittant
failures.
Added a new framework utility for creating CRDs per test.
Then making the relevant tests use the utility to prevent name
collision/race.
Fixed bazel build.
Factored in fixes for @caesarxuchao
Making suggested change for @janetkuo
2018-02-06 11:34:57 -08:00
Kubernetes Submit Queue 9ee71b720e
Merge pull request #59059 from smarterclayton/move_partial_object
Automatic merge from submit-queue (batch tested with PRs 59158, 38320, 59059, 55516, 59357). 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>.

Promote v1alpha1 meta to v1beta1

No code changes, just renames. We can discuss if there are any field / naming changes here or in a follow-up

Parent #58536
Fixes #53224
Prereq to #55637

@kubernetes/sig-api-machinery-pr-reviews @deads2k

```release-note
The `meta.k8s.io/v1alpha1` objects for retrieving tabular responses from the server (`Table`) or fetching just the `ObjectMeta` for an object (as `PartialObjectMetadata`) are now beta as part of `meta.k8s.io/v1beta1`.  Clients may request alternate representations of normal Kubernetes objects by passing an `Accept` header like `application/json;as=Table;g=meta.k8s.io;v=v1beta1` or `application/json;as=PartialObjectMetadata;g=meta.k8s.io;v1=v1beta1`.  Older servers will ignore this representation or return an error if it is not available.  Clients may request fallback to the normal object by adding a non-qualified mime-type to their `Accept` header like `application/json` - the server will then respond with either the alternate representation if it is supported or the fallback mime-type which is the normal object response.
```
2018-02-05 12:40:37 -08:00
Joe Betz f0d04b7131 Update etcd server version to 3.2.13 2018-02-02 17:25:13 -08:00