Commit Graph

98283 Commits

Author SHA1 Message Date
Patrick Ohly
d43308e64c e2e storage: simpler port forwarding
Instead of trying to use the client-go portforward package as-is it is
simpler to copy some code from it and then use the http stream
directly. That way we don't need to go through a local listening
socket and error handling and logging becomes simpler.
2021-03-01 19:22:37 +01:00
Patrick Ohly
3adcf11b45 e2e storage: use embedded mock CSI driver
This replaces embedding of JavaScript code into the mock driver that
runs inside the cluster with Go callbacks which run inside the
e2e.test suite itself. In contrast to the JavaScript hooks, they have
direct access to all parameters and can fabricate arbitrary responses,
not just error codes.

Because the callbacks run in the same process as the test itself, it
is possible to set up two-way communication via shared variables or
channels. This opens the door for writing better tests. Some of the
existing tests that poll mock driver output could be simplified, but
that can be addressed later.

For now, only tests using hooks use embedding. How gRPC calls are
retrieved is abstracted behind the CSIMockTestDriver interface, so
tests don't need to be modified when switching between embedding
and remote mock driver.
2021-03-01 19:22:37 +01:00
Patrick Ohly
92bac8afc1 mock driver: fix no-op setDefaultCreds
The function must modify the content of the "creds" pointer, not the
pointer.

Found via hack/verify-staticcheck.sh after importing the code into
Kubernetes. It is uncertain whether this bug had any consequences.
2021-03-01 19:22:37 +01:00
Patrick Ohly
a2a34bb744 mock driver fixes 2021-03-01 19:22:37 +01:00
Patrick Ohly
ab365c091c mock driver: replace logrus with klog
klog now has structured logging.
2021-03-01 19:22:37 +01:00
Patrick Ohly
df6d3bc7dd CSI mock driver: fix faulty error message
Caught by verify-typecheck.sh after importing the code into
Kubernetes:

ERROR(linux/arm): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:404:20: math.MaxUint32 (untyped int constant 4294967295) overflows int
ERROR(linux/arm): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:795:20: math.MaxUint32 (untyped int constant 4294967295) overflows int
ERROR(linux/386): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:404:20: math.MaxUint32 (untyped int constant 4294967295) overflows int
ERROR(linux/386): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:795:20: math.MaxUint32 (untyped int constant 4294967295) overflows int
ERROR(windows/386): /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:404:20: math.MaxUint32 (untyped int constant 4294967295) overflows int
ERROR(windows/386):
/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/drivers/csi-test/mock/service/controller.go:795:20:
math.MaxUint32 (untyped int constant 4294967295) overflows int

Instead of producing our own error message, we can show the original
value and the error from strconv.
2021-03-01 19:22:37 +01:00
Patrick Ohly
7008196093 csi-test: import copyright clarification
The code originates in csi-test and this copyright change was made by
the original author in https://github.com/kubernetes-csi/csi-test/pull/324
2021-03-01 19:22:37 +01:00
Patrick Ohly
7f2b438020 e2e: import csi-test mock driver
This is a verbatim copy of the corresponding files in csi-test v4.0.2.

They'll be modified in future commits to make the code usable when
embedded in e2e.test. Some of those changes may be worthwhile
backporting to csi-test, but this is uncertain at this time.
2021-03-01 19:22:37 +01:00
Patrick Ohly
21ffdd1a28 test: update CSI mock driver
The new release properly checks for existence of the staging
directory. The names of the volumes are now the same as in
https://github.com/kubernetes-csi/csi-test/blob/master/mock/example/deploy/csi-mock-driver-deployment.yaml
2021-03-01 19:22:37 +01:00
Patrick Ohly
99248b1406 e2e: reduce worker threads during mock testing
We don't need much concurrency and having too many worker threads has
one disadvantage (besides resource usage): when the sidecar looses the
connection to the CSI driver, it calls klog.Fatal, which prints all
gouroutines. This can lead to much output.
2021-03-01 19:22:37 +01:00
Kubernetes Prow Robot
35c233f18d
Merge pull request #99590 from liggitt/kubelet-warning
Avoid kubelet warnings for imagePullSecret entries with empty names
2021-03-01 09:55:39 -08:00
Kubernetes Prow Robot
5498ee641b
Merge pull request #99561 from BenTheElder/remove-bazel
Remove Bazel
2021-03-01 09:55:27 -08:00
Kubernetes Prow Robot
f6152d1521
Merge pull request #97086 from xing-yang/check_datasource
Only CSI plugin can have a DataSource
2021-03-01 06:53:26 -08:00
Jordan Liggitt
4798d0bce2 Avoid kubelet warnings for imagePullSecret entries with empty names 2021-03-01 08:32:09 -05:00
Kubernetes Prow Robot
793390e13b
Merge pull request #99538 from liggitt/skip-empty-names
Skip visiting empty secret and configmap names
2021-03-01 00:12:39 -08:00
Kubernetes Prow Robot
6a9182c944
Merge pull request #98867 from nikhita/kind-feature-template-remove
.github: update enhancement issue template to point to KEPs
2021-02-28 20:22:41 -08:00
Kubernetes Prow Robot
74811759dc
Merge pull request #99564 from aojea/tcpproxy_ntry
fix e2e test kube-proxy tcp_wait
2021-02-28 16:58:39 -08:00
Benjamin Elder
d296698b1a remove BUILD copy from verify-openapi-spec.sh 2021-02-28 15:57:13 -08:00
Antonio Ojea
1b61f49995 fix e2e test kube-proxy tcp_wait 2021-03-01 00:54:57 +01:00
Benjamin Elder
603c942e41 drop directories that only contained bazel-related sources 2021-02-28 15:17:30 -08:00
Benjamin Elder
b1b2f239fe remove bazel related entries in build/dependencies.yaml 2021-02-28 15:17:30 -08:00
Benjamin Elder
d9ef7cbe8c drop bazel related tools from hack/tools module 2021-02-28 15:17:29 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Benjamin Elder
95e4a6bcda remove now-unecessary logic from hack/verify-bazel.sh 2021-02-28 15:16:53 -08:00
Benjamin Elder
a1f2787897 automate removing bazel in hack/update-bazel.sh 2021-02-28 15:16:53 -08:00
Kubernetes Prow Robot
4880b996b5
Merge pull request #99433 from navist2020/fix/kubeadm/out_info
Replace yml with yaml
2021-02-28 09:50:39 -08:00
Kubernetes Prow Robot
c410910c1f
Merge pull request #99512 from knabben/add-netpol-ports
Adding specific protocol network policy test
2021-02-28 07:36:39 -08:00
Kubernetes Prow Robot
a185bafa0c
Merge pull request #99549 from BenTheElder/conformance-make
conformance.yaml: generate with make
2021-02-28 05:30:39 -08:00
Benjamin Elder
025e6de3eb don't run generated_files when generating specsummaries.json 2021-02-28 00:54:54 -08:00
Benjamin Elder
ed09168e8a fix generated conformance filepaths when test binary is not stripped 2021-02-28 00:54:54 -08:00
Benjamin Elder
c1c3fdefe3 port conformance yaml generation to hack 2021-02-28 00:54:54 -08:00
Kubernetes Prow Robot
184c6d348c
Merge pull request #99506 from wojtek-t/cleanup_describe_9
Cleanup SIGDescribe in test/e2e/network
2021-02-27 12:56:38 -08:00
Jordan Liggitt
ec4d1b3821 Skip visiting empty secret and configmap names 2021-02-27 15:54:38 -05:00
wojtekt
749922fa46 Cleanup SIGDescribe in test/e2e/network 2021-02-27 20:29:27 +01:00
Kubernetes Prow Robot
bd190762fb
Merge pull request #99524 from lala123912/sig_describe
Replace top-level ginkgo.Describe with SIGDescribe
2021-02-26 23:28:38 -08:00
lala123912
5faa51e5d6 Replace top-level ginkgo.Describe with SIGDescribe 2021-02-27 14:26:36 +08:00
Kubernetes Prow Robot
2014d37e51
Merge pull request #99520 from chymy/fix-staticcheck0227
Fix static failures for vendor/k8s.io/apiserver/pkg/endpoints/handlers
2021-02-26 20:52:39 -08:00
Kubernetes Prow Robot
f2d5ee2d2d
Merge pull request #99508 from wojtek-t/cleanup_describe_10
Move node_recreate test to cloud/gcp directory
2021-02-26 18:06:38 -08:00
chymy
04515b9c0a Fix static failures for vendor/k8s.io/apiserver/pkg/endpoints/handlers 2021-02-26 21:01:55 -05:00
Amim Knabben
20263a07a6 Added protocol specific netpol 2021-02-26 18:11:45 -05:00
Kubernetes Prow Robot
fb6349c15b
Merge pull request #99501 from logicalhan/owners
add Yuchen to reviewers
2021-02-26 14:51:02 -08:00
Kubernetes Prow Robot
157c4bbf85
Merge pull request #99390 from pacoxu/use-random-node/e2e
[e2e] use random node to avoid node0 overloaded
2021-02-26 14:50:54 -08:00
Kubernetes Prow Robot
5491484aa9
Merge pull request #99386 from BenTheElder/conformance-on-release
don't default to building conformance image for fastbuilds (quick-rel…
2021-02-26 14:50:46 -08:00
Kubernetes Prow Robot
1428969a73
Merge pull request #96610 from andrewsykim/service-lb-node-port-e2e
test/integration: add integration tests for service.spec.allocateLoadBalancerNodePorts
2021-02-26 14:50:38 -08:00
Kubernetes Prow Robot
3cde6b1999
Merge pull request #99324 from zshihang/master
reset token if got Unauthorized in KCM
2021-02-26 13:58:27 -08:00
Kubernetes Prow Robot
29c661bd2f
Merge pull request #97834 from chrishenzie/volume-attachment-informer
Update CSI attacher to fetch VolumeAttachments from lister
2021-02-26 13:58:15 -08:00
wojtekt
4b98a9f1e6 Move node_recreate test to cloud/gcp directory 2021-02-26 21:47:27 +01:00
Kubernetes Prow Robot
c200a8f9b7
Merge pull request #98433 from damemi/remove-helper-from-volume-zone
Move GetPersistentVolumeClaimClass to component-helpers
2021-02-26 12:38:15 -08:00
Kubernetes Prow Robot
e5e3c8d4f5
Merge pull request #99467 from wojtek-t/cleanup_describe_5
Remove KubeDescribe from SIGDescribe calls
2021-02-26 11:32:44 -08:00
Kubernetes Prow Robot
dbb6cfa7fb
Merge pull request #99445 from pohly/generic-ephemeral-volume-test
test: fix skipping of GenericEphemeralVolume volume type
2021-02-26 11:32:36 -08:00