Commit Graph

12517 Commits (651faf2e0d9089a7eb7e172f5cf4bfd311e888ad)

Author SHA1 Message Date
Jesse Haka c75b0bf8ca disable xfs localvolume test 2019-02-15 21:31:25 +02:00
Kenichi Omichi 2635b6d95c Use framework.ExpectNoError() instead Expect()
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it.
2019-02-15 16:52:57 +00:00
Marek Counts 160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
Marek Counts 7744f90830 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.
2019-02-15 10:28:13 -05:00
Ben Moss 34ac4d9ee9 Update deprecated links 2019-02-15 09:13:07 -05:00
Kubernetes Prow Robot 763042e938
Merge pull request #73939 from jiayingz/cuda10-test
Update ppc64le cuda-vector-add 2.0 to be based on Cuda10 base image.
2019-02-15 05:28:00 -08:00
Patrick Ohly ec3655a1d4 e2e/storage: re-initialize all local variables
There is a risk that the init function does not reset one of the local
variables that was set by a previous test. To avoid this, all
variables set by init are now in a struct which gets cleaned
completely first.
2019-02-15 11:03:28 +01:00
Patrick Ohly e79cd9efe1 e2e: update bazel BUILD files
Generated via hack/update-bazel.sh.
2019-02-15 11:01:09 +01:00
Patrick Ohly 4643624084 e2e/storage: remove test pattern filtering
The recommended approach for not running unsuitable tests is to skip
them at runtime with an explanation. Filtering out unsuitable test
patters and thus not even defining unsuitable tests was done earlier
because it was faster than skipping tests at runtime.

But now these tests can be skipped efficiently, so this special case
can be removed.
2019-02-15 11:01:08 +01:00
Patrick Ohly 05cc31697f e2e/storage: speed up skipping, simplify APIs and test definition
CreateDriver (now called SetupTest) is a potentially expensive
operation, depending on the driver. Creating and tearing down a
framework instance also takes time (measured at 6 seconds on a fast
machine) and produces quite a bit of log output.

Both can be avoided for tests that skip based on static
information (like for instance the current OS, vendor, driver and test
pattern) by making the test suite responsible for creating framework
and driver.

The lifecycle of the TestConfig instance was confusing because it was
stored inside the DriverInfo, a struct which conceptually is static,
while the TestConfig is dynamic. It is cleaner to separate the two,
even if that means that an additional pointer must be passed into some
functions. Now CreateDriver is responsible for initializing the
PerTestConfig that is to be used by the test.

To make this approach simpler to implement (= less functions which
need the pointer) and the tests easier to read, the entire setup and
test definition is now contained in a single function. This is how it
is normally done in Ginkgo. This is easier to read because one can see
at a glance where variables are set, instead of having to trace values
though two additional structs (TestResource and TestInput).

Because we are changing the API already, also other changes are made:
- some function prototypes get simplified
- the naming of functions is changed to match their purpose
  (tests aren't executed by the test suite, they only get defined
  for later execution)
- unused methods get removed (TestSuite.skipUnsupportedTest is redundant)
2019-02-15 11:01:05 +01:00
Youbing Li 0756781994 Fixes #73077 - Allow to convert type across all version 2019-02-15 04:03:35 -05:00
Kubernetes Prow Robot 808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
Patrick Ohly 1cb121d2a9 e2e/storage: introduce TestVolume interface
This increases type safety and makes the code easier to read because
it becomes obvious that the "test resource" passed to some functions
must be the result of a previous CreateVolume.

This makes it possible to remove:
- functions that never did anything (the DeleteVolume methods in
  drivers that never create a volume)
- type casts (in the DeleteVolume implementation)
- the unused DeleteVolume parameters
- the stand-alone DeleteVolume function (which would be just a non-nil
  check)

GetPersistentVolumeSource and GetVolumeSource could also become
methods on more specific interfaces - they don't actually use anything
from TestDriver instance which provides them.

The main motivation however is to reduce the number of methods which
might need an explicit test config parameter.
2019-02-15 08:38:54 +01:00
帝俊 09519fde26
fix typo 2019-02-15 15:28:43 +08:00
Kubernetes Prow Robot 0eb69f6b92
Merge pull request #74079 from jarrpa/csi-cluster-registrar
CSIDriverRegistrar e2e cleanups
2019-02-14 17:05:51 -08:00
Kubernetes Prow Robot 1b8c8f1daf
Merge pull request #73831 from jennybuckley/apply-create-service
Honor forceAllowCreate in service registry
2019-02-14 13:59:44 -08:00
Jose A. Rivera a33acd2ba6 CSIDriverRegistry e2e: Use framework.Poll when waiting for PVC delete
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-14 11:25:15 -06:00
Jose A. Rivera 86c71472df CSIDriverRegistry e2e: Wait for CSIDriver creation
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-14 11:25:15 -06:00
Jose A. Rivera 81bc0e5ec8 CRIDriverRegistry e2e: Clarify variable name
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-14 06:59:43 -06:00
Jose A. Rivera 1ac3b37848 CSIDriverRegistry e2e: Always clean up driver
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-14 06:56:17 -06:00
Kubernetes Prow Robot d8f0146138
Merge pull request #72214 from caesarxuchao/move-discovery
Move cached discovery clients to their own packages
2019-02-13 23:07:00 -08:00
Kubernetes Prow Robot b13438ab24
Merge pull request #73928 from wongma7/protection-waitforfirstconsumer
Fix PVC protection e2es when default storage class is WaitForFirstConsumer
2019-02-13 21:50:17 -08:00
Kubernetes Prow Robot 2e287a0ac1
Merge pull request #73677 from jarrpa/csi-cluster-registrar
e2e: Use cluster-driver-registrar for CSIDriverRegistry tests
2019-02-13 17:31:33 -08:00
Kubernetes Prow Robot 888ff4097a
Merge pull request #73651 from RobertKrawitz/node_pids_limit
Support total process ID limiting for nodes
2019-02-13 17:31:18 -08:00
Kubernetes Prow Robot 508a4f7544
Merge pull request #74000 from caesarxuchao/json-patch-operations
Limit the number of operations in a single json patch to be 10,000
2019-02-13 16:12:12 -08:00
Kubernetes Prow Robot f9af7e94a9
Merge pull request #73962 from wongma7/glusterfs-sc
Fix glusterfs e2e not using correct storageclass
2019-02-13 14:32:16 -08:00
Kubernetes Prow Robot a5653dc01b
Merge pull request #73903 from smarterclayton/cluster_upgrade
Upgrade tests don't tolerate nodes with taints correctly
2019-02-13 14:32:05 -08:00
Jose A. Rivera 62f3211d76 Run hack/update-bazel.sh
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-13 15:06:58 -06:00
Jose A. Rivera 6115fc49a6 Use cluster-driver-registrar for CSIDriverRegistry tests
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2019-02-13 15:06:58 -06:00
Kubernetes Prow Robot 812016fa23
Merge pull request #73818 from gnufied/add-e2e-for-no-expand
add e2e test when expansion is disabled
2019-02-13 12:16:09 -08:00
Robert Krawitz 2597a1d97e Implement SupportNodePidsLimit, hand-tested 2019-02-13 14:56:17 -05:00
Chao Xu 5e6fc5dce8 Limit the number of operations in a single json patch to be 10,000 2019-02-13 10:53:32 -08:00
Kenichi Omichi 89f6f1d0cc Fix golint failures under e2e/framework/metrics 2019-02-13 18:07:16 +00:00
Kubernetes Prow Robot 1250237316
Merge pull request #73995 from humblec/fix-e2e
Use correct server url in dynamic provisioning tests
2019-02-13 09:45:15 -08:00
Matthew Wong 2f981fa4c1 Fix PVC protection e2es when default storage class is WaitForFirstConsumer 2019-02-13 12:41:45 -05:00
Hemant Kumar 7d823e5df0 also remove slow tag from resizing tests 2019-02-13 10:48:49 -05:00
Hemant Kumar e3faa003a1 add e2e test when expansion is disabled
Also refactor some of the code that creates resizable SC
2019-02-13 10:48:49 -05:00
Humble Chirammal a078ebf246 Set correct server uri on e2e dynamic provisioner
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-02-13 13:52:38 +05:30
s-ito-ts b46cbc31cd Add e2e test for scale sub-resource of statefulsets 2019-02-13 08:04:37 +00:00
Kubernetes Prow Robot 5442980dd9
Merge pull request #73900 from cofyc/fix-local-test
Wait for first pod to termiante in PV test
2019-02-12 20:01:57 -08:00
Kubernetes Prow Robot 461dccf246
Merge pull request #73898 from xiezongzhe/patch-5
fix typo
2019-02-12 20:01:47 -08:00
Kubernetes Prow Robot 2aedcbc7ca
Merge pull request #73761 from andrewsykim/remove-cloud-provider-volume-deps
remove cloud provider dependencies to pkg/volume
2019-02-12 18:45:24 -08:00
Kenichi Omichi dbe669aeb1 Move PrintSample() to place which uses it
PrintSample() was used at metrics_util.go only, so this moves
the method to metrics_util.go and makes it local.
2019-02-13 01:32:53 +00:00
Kubernetes Prow Robot 5c780c8cb1
Merge pull request #73978 from oomichi/golint-e2e-framework-timer
Fix golint failures of test/e2e/framework/timer
2019-02-12 17:29:43 -08:00
Kubernetes Prow Robot 29403174fb
Merge pull request #73805 from caesarxuchao/resource-size-limit
Adding a limit on the size of request body the apiserver will decode for write operations
2019-02-12 15:10:57 -08:00
Kubernetes Prow Robot 72eb785f60
Merge pull request #73440 from yliaog/master
Fix resource quota e2e test
2019-02-12 15:10:47 -08:00
Chao Xu 1f2e2e61cf generated 2019-02-12 15:04:57 -08:00
Kenichi Omichi 60ded1d54a Fix golint failures of test/e2e/framework/timer 2019-02-12 21:01:39 +00:00
Kubernetes Prow Robot ff504cd869
Merge pull request #73681 from kwiesmueller/feature-serverside-apply
strip selected fields from managedFields
2019-02-12 12:39:20 -08:00
Chao Xu 3f21ca029a changing imports 2019-02-12 10:06:04 -08:00
Kubernetes Prow Robot f968499812
Merge pull request #72002 from pohly/storage-volume-testsuites-concurrency
E2E storage: more tests for different pod/node combinations
2019-02-12 10:04:50 -08:00
Matthew Wong 6d73de1154 Fix glusterfs e2e not using correct storageclass 2019-02-12 11:31:29 -05:00
Patrick Ohly ecc0c4e4b4 e2e/storage: enable concurrent writes for gcepd
The driver should support multiple pods using the same volume on the
same node.
2019-02-12 09:21:50 +01:00
Patrick Ohly 03d352f7aa e2e/storage: test usage of volume in multiple pods at once
This is a special case that both kubelet and the volume driver should
support, because users might expect it. One Kubernetes mechanism to
deploy pods like this is via pod affinity.

However, strictly speaking the CSI spec does not allow this usage
mode (see https://github.com/container-storage-interface/spec/pull/150) and
there is an on-going debate to enable it (see
https://github.com/container-storage-interface/spec/issues/178). Therefore
this test gets skipped unless explicitly enabled for a driver.

CSI drivers which create a block device for a remote volume in
NodePublishVolume fail this test. They have to make the volume
available in NodeStageVolume and then in NodePublishVolume merely do a
bind mount (as for example in
https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/gce-pd-csi-driver/node.go#L150).
2019-02-12 09:21:50 +01:00
Patrick Ohly ca42cf4993 e2e/storage: test provisioned volume on multiple nodes
Whether the read test after writing was done on the same node was
random for drivers that weren't locked onto a single node. Now it is
deterministic: it always happens on the same node.

The case with reading on another node is covered separately for test
configurations that support it (not locked onto a single node, more
than one node in the test cluster).

As before, the TestConfig.ClientNodeSelector is ignored by the
provisioning testsuite.
2019-02-12 09:21:50 +01:00
pontiyaraja 6d7a707320 Test case for shared volumes between the containers in pod 2019-02-12 12:26:43 +05:30
Kubernetes Prow Robot 34e523f188
Merge pull request #73860 from msau42/owners
add msau42 to approvers for volume e2es
2019-02-11 19:58:29 -08:00
Yecheng Fu 00a7fc3208 Wait for first pod to termiante in local pv test
local plugin will skip setting fsGroup if volume is mounted by other pods
2019-02-12 09:55:49 +08:00
Kubernetes Prow Robot 0ae81c986a
Merge pull request #67678 from caesarxuchao/remove-storage-versions-flag
Remove storage versions flag
2019-02-11 17:40:27 -08:00
Jiaying Zhang d66cd67377 Update ppc64le cuda-vector-add 2.0 to be based on Cuda10 base image. 2019-02-11 15:45:53 -08:00
Kevin Wiesmüller 9082cac482 strip selected fields from managedFields
refactor fieldstrip and update tests

add checks and remove empty fields

shorten test and check for nil manager

fix gofmt

panic on nil manager
2019-02-11 23:10:57 +01:00
Jennifer Buckley 1a5e48e29d Honor forceAllowCreate in service registry 2019-02-11 11:05:30 -08:00
Claudiu Belu 434090349d tests: Adds [LinuxOnly] tag to conformance test
The test "should write entries to /etc/hosts" should have the [LinuxOnly] tag as
it cannot pass on Windows; individual files cannot be mounted in Windows Containers.

This test was missed in the original PR (https://github.com/kubernetes/kubernetes/pull/73204)
2019-02-11 02:44:09 -08:00
zhoulin xie f71bc19ca8 Fix fmt.Sprintf error message
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-02-11 16:43:20 +08:00
Clayton Coleman a7dfbb99c4
updates: DaemonSet test should tolerate all taints
The test specifically includes all nodes, but doesn't actually ensure
the daemonset covers all nodes despite taints.
2019-02-10 23:53:57 -05:00
Clayton Coleman 3e0dd7f365
upgrade: ClusterUpgrade and MasterUpgrade are equivalent
Some tests were only checking for MasterUpgrade, but that is also
implied by ClusterUpgrade.
2019-02-10 23:51:27 -05:00
xiezongzhe 3cec62b3f5
fix typo
Is ->It in line 6
2019-02-11 11:38:25 +08:00
Kubernetes Prow Robot b862590bfc
Merge pull request #73847 from wojtek-t/watch_metric
Add metric exposing amount of processed init events in watchcache
2019-02-10 03:47:35 -08:00
Patrick Ohly 54d8f1648f e2e/storage: improve PV checking
TestDynamicProvisioning had multiple ways of choosing additional
checks:
- the PvCheck callback
- the builtin write/read check controlled by a boolean
- the snapshot testing

Complicating matters further, that builtin write/read test had been
more customizable with new fields `NodeSelector` and
`ExpectUnschedulable` which were only set by one particular test (see
https://github.com/kubernetes/kubernetes/pull/70941).

That is confusing and will only get more confusing when adding more
checks in the future. Therefore the write/read check is now a separate
function that must be enabled explicitly by tests that want to run it.
The snapshot checking is also defined only for the snapshot test.

The test that expects unschedulable pods now also checks for that
particular situation itself. Instead of testing it with two pods (the
behavior from the write/read check) that both fail to start, only a
single unschedulable pod is created.

Because node name, node selector and the `ExpectUnschedulable` were
only used for checking, it is possible to simplify `StorageClassTest`
by removing all of these fields.

Expect(err).NotTo(HaveOccurred()) is an anti-pattern in Ginkgo testing
because a test failure doesn't explain what failed (see
https://github.com/kubernetes/kubernetes/issues/34059). We avoid it
now by making the check function itself responsible for checking
errors and including more information in those checks.
2019-02-09 14:20:17 +01:00
Patrick Ohly 5b8826b610 e2e/storage: use different names for test pods
When the provisioning test gets stuck, the log fills up with messages
about waiting for a certain pod to run. Now the pod names are
pvc-[volume-tester|snapshot]-[writer|reader] plus the random
number appended by Kubernetes. This makes it easier to see where the
test is stuck.
2019-02-09 14:20:17 +01:00
Patrick Ohly e92bdd14cc e2e/storage: remove unnecessary empty string checks
There is no need to check for empty strings, we can also directly
initialize structs with the value. The end result is the same when the
value is empty (empty string in the struct).
2019-02-09 14:20:17 +01:00
Patrick Ohly 315266b25e e2e: refine snapshot test
This addresses the two remaining change requests from
https://github.com/kubernetes/kubernetes/pull/69036:
- replace "csi-hostpath-v0" name check with capability
  check (cleaner that way)
- add feature tag to "should create snapshot with defaults" because
  that is an alpha feature

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2019-02-09 14:20:17 +01:00
Patrick Ohly f8536e8e42 e2e: fix snapshot skip test
Even if snapshots are supported by the driver interface, the driver or
suite might still want to skip a particular test, so those checks
still need to be executed.
2019-02-09 14:19:37 +01:00
Andrew Kim ca6a051b00 remove cloud provider dependencies to pkg/volume
Co-authored-by: Weibin Lin <linweibin1@huawei.com>
2019-02-09 01:16:55 -05:00
Antoine Pelisse 308c981633 Add basic server-side apply test to test-cmd 2019-02-08 16:51:29 -08:00
Chao Xu e90409d735 add integration test 2019-02-08 16:15:43 -08:00
Claudiu Belu 609b5c3010 tests: Adds docker hub Windows image test case
Adds the test "should be able to pull image from docker hub [WindowsOnly]",
which will pull a Windows busybox image from dockerhub. Since it is busybox,
the same command will also work for this image.

The busybox image is currently used in other E2E tests, so the image should
already be prepulled on the nodes. Additionally, the image has a manifest list
for Windows Server 1803 and Windows Server 2019, and future versions will be
added to it.
2019-02-08 15:25:56 -08:00
Kubernetes Prow Robot 8f7ccf8d4c
Merge pull request #69036 from wackxu/snapshottest
add e2e test for snapshot
2019-02-08 13:14:04 -08:00
Kubernetes Prow Robot 834c9a5e3d
Merge pull request #72491 from liggitt/delegated-auth-permissions
Ensure controller manager and scheduler can perform delegated auth checks
2019-02-08 11:53:52 -08:00
Yu Liao fa6699dc4d there could be existing resource quotas, count them first and check the
expected is the existing + 1
2019-02-08 11:35:56 -08:00
Michelle Au ddc1a9c8c8 add msau42 to approvers for volume e2es 2019-02-08 11:34:02 -08:00
Kubernetes Prow Robot 54a578d3a1
Merge pull request #72012 from yeya24/patch-1
fix typos lable -> label
2019-02-08 10:36:05 -08:00
Kubernetes Prow Robot b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Jordan Liggitt 4212a9a05a Ensure controller manager and scheduler can perform delegated auth checks 2019-02-08 11:15:52 -05:00
wojtekt 0a0835e92d Add metric exposing amount of processed init events in watchcache 2019-02-08 13:03:33 +01:00
Kubernetes Prow Robot a7966022d7
Merge pull request #73714 from tallclair/debian-base
Bump debian-* base image versions to latest
2019-02-07 19:44:44 -08:00
Kubernetes Prow Robot eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Jiaying Zhang 8408188cdf Update CudaVectorAdd test image to be built with Cuda10 docker image.
The previous version of CudaVectorAdd test image can still be used
in our testing. A later change will extend the existing gpu e2e tests
to run pods with two containers. One with CudaVectorAdd version1 and
the other with CudaVectorAdd version2 so that we can test both
Cuda versions.
2019-02-07 13:29:48 -08:00
Kubernetes Prow Robot 713eaf450f
Merge pull request #73511 from vikaschoudhary16/image-only
Add image for sample-device-plugin
2019-02-07 04:59:11 -08:00
vikaschoudhary16 0ec6bdd2b5 Add image for sample-device-plugin 2019-02-07 11:28:28 +05:30
Claudiu Belu 00e2582c67 Adds Windows-related Networking tests
Creating pods with HostNetwork is not currently supported on
Windows Kubelet, and thus, ones without HostNetwork are created instead.
2019-02-06 15:58:18 -08:00
Kubernetes Prow Robot 3dedf4b7f6
Merge pull request #73525 from cofyc/fix71237-intree
Implement localDriver with various local volume types
2019-02-06 10:44:37 -08:00
Kubernetes Prow Robot ae45068688
Merge pull request #72323 from danielqsj/dockershim
Change docker metrics to conform metrics guidelines
2019-02-06 09:30:54 -08:00
Kubernetes Prow Robot fcb0d60d4c
Merge pull request #73716 from deads2k/delete-all
add --all-namespaces to kubectl delete
2019-02-06 01:20:15 -08:00
Yecheng Fu aa87e4b57c Implement localDriver 2019-02-06 12:28:28 +08:00
Kubernetes Prow Robot 9384e93dc1
Merge pull request #73749 from wongma7/subpath-init-write-multiple
Fix multiple subpaths e2e: read/write in same container
2019-02-05 13:57:02 -08:00
Kubernetes Prow Robot 3f933ec7c4
Merge pull request #72407 from aespejel/fix_resource_consumer_metrics_endpoint
Fixed /metrics endpoint for resource consumer
2019-02-05 12:08:49 -08:00
Kubernetes Prow Robot fdfc3b86d8
Merge pull request #73258 from Betula-L/master
fix test config pod spec affinity mishandling
2019-02-05 10:48:59 -08:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
David Eads 66b1f5ba67 add --all-namespaces to 2019-02-05 13:37:14 -05:00