Commit Graph

57 Commits

Author SHA1 Message Date
Tim Hockin
11a25bfeb6
De-share the Handler struct in core API (#105979)
* De-share the Handler struct in core API

An upcoming PR adds a handler that only applies on one of these paths.
Having fields that don't work seems bad.

This never should have been shared.  Lifecycle hooks are like a "write"
while probes are more like a "read". HTTPGet and TCPSocket don't really
make sense as lifecycle hooks (but I can't take that back). When we add
gRPC, it is EXPLICITLY a health check (defined by gRPC) not an arbitrary
RPC - so a probe makes sense but a hook does not.

In the future I can also see adding lifecycle hooks that don't make
sense as probes.  E.g. 'sleep' is a common lifecycle request. The only
option is `exec`, which requires having a sleep binary in your image.

* Run update scripts
2021-10-29 13:15:11 -07:00
Antonio Ojea
8e2eeffa79 PokeHTTP default timeout to avoid hanging connections 2021-06-02 22:38:12 +02:00
Pavithra Ramesh
2430f23445 Use a less-common port for e2e test http pod.
8080 is a common port that is more likely to cause conflicts when used
in hostNetwork mode for tests.
2021-04-22 13:17:10 -07:00
Niekvdplas
fec272a7b2 Fixed several spelling mistakes 2021-03-30 23:02:09 +02:00
Federico Paolinelli
a0ca1fd63f Network Tests: bind host network udp listeners to hostIPs
When listening on udp, the reply is sent using a src address which is
the address of the gateway interface. This means that when listening to
any, the reply can be sent out with a src ip which is different from the
request's target ip. This confuses natting and "connectionful" udp
services do not work.
Here, we force the endpoint to listen from the hostIP and from podIPs,
to cover both dual stack and legacy clusters.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2021-03-09 11:52:35 +01:00
Antonio Ojea
638da25dd1 Revert "use uncommon ports for e2e network test"
This reverts commit be1ed2f43a.

The problem happens when the pod tries to be scheduled, not the
service. Also, maybe skipping is not the best idea ...
2020-12-14 08:56:16 +01:00
Kubernetes Prow Robot
379ed6644d
Merge pull request #96484 from aojea/e2etest
add e2e test for dual-stack secondary service IPs
2020-11-18 15:28:51 -08:00
Antonio Ojea
ad043f2bdd e2e dualstack test fixes
remove unused variables and fix comments
2020-11-16 23:18:30 +01:00
Antonio Ojea
be1ed2f43a use uncommon ports for e2e network test
since we added tests to check connectivity against pods with
hostNetwork: true, there is the possibility that those pods
fail to run because the port is being used in the host.

Current test were using port 8080,8081 and 8082 that are commonly
used in hosts for other applications.

If the service is not ready after a certain time, and we are using
Pods with hostNetwork: true we assume that there is a conflict
and skip this test.
2020-11-12 11:09:01 +01:00
Antonio Ojea
ed694a1bf6 add e2e test for dual-stack secondary service IPs
Dual stack services can have two ClusterIPs, we already have tests that
exercise the connectivity from different scenarios to the first
ClusterIP of the service.

This PR adds a new functionality to the e2e network utils to enable
DualStack services, and replicate the same tests but using the
secondary ClusterIP, so we cover the connectivity to both cluster IPs.
2020-11-12 10:07:04 +01:00
Kubernetes Prow Robot
a5bce462d0
Merge pull request #94812 from aojea/e2ehostnet2
e2e test for services using pods with hostNetwork as backend
2020-11-10 14:35:38 -08:00
knight42
3c4d6859c8
refactor: migrate health checks of control-plane off insecure port in tests
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-10-31 11:39:25 +08:00
Antonio Ojea
734d5bbed0 e2e use functional options to configure NetworkingTest
NetworkingTest is used to test different network scenarios.
Since new capabilites and scenarios are added, like SCTP or HostNetwork
for pods, we need a way to configure it with minimum disruption and code
changes.

Go idiomatic way to achieve this is using functional options.
2020-10-26 22:18:05 +01:00
Antonio Ojea
d382f299a1 fix e2e service test container listening port
the e2e test container used for the "Networking Granular Checks: Services"
tests only needs to listen in one port to perform do network checks.
This port is unrelated to the other ports used in the test, so we may
use a different number to avoid possible conflicts.
2020-10-26 22:07:36 +01:00
Kubernetes Prow Robot
943b1dbf53
Merge pull request #95495 from deads2k/remove-secondary-retry
remove secondary client retries in e2e tests
2020-10-15 08:06:39 -07:00
David Eads
64c099d670 remove secondary client retries in e2e tests 2020-10-15 08:30:42 -04:00
jay vyas
e7a9a94da8 simpler addition of nodeport basic validation 2020-10-11 11:36:02 -04:00
jay vyas
8630dc924a Update test/e2e/framework/network/utils.go
add logging about min/max interval
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2020-10-05 19:01:33 -04:00
jay vyas
56def96d9d Update DialFromNode to return values as is done w/ other tests. Update
comments to clarify missing probability check function (since they need
to be updated anyways b/c of the return value introduced)
2020-10-04 15:59:20 -04:00
jay vyas
4c52ce7f87 just log essential pod info 2020-10-01 08:32:41 -04:00
Vishwanath Sangale
b8e733fb94 Updated symbol 'framework.GetAllMasterAddresses' to not use word 'master' 2020-09-29 21:43:10 -07:00
jay vyas
60c8a36a7b Add failure logic to tests that rely on side-effect-free dial functions. 2020-09-23 09:36:23 -05:00
jay vyas
64548b3cfa Adding back in the breadth-first-polling logic.
"Revert "Merge pull request #93837 from jayunit100/DialFromContainerB""

This reverts commit f7a28c3904.
2020-09-23 09:09:38 -05:00
Antonio Ojea
f7a28c3904 Revert "Merge pull request #93837 from jayunit100/DialFromContainerB"
This reverts commit 61490bba46, reversing
changes made to 9ecab1b4b2.

Some methods from the networking e2e tools are dialing from a
containter to another container, and failing the test if there was no
connectivity. This PR modified the methods to return an error instead of
failing the test.
However, these methods were used by other tests in the framework, and
they are not checking if the method returns an error, expecting that
the method fail the test. With this change, any connectivity problem
will go unnoticed on the tests that are not asserting the error, so we
need to revert to previous state.
2020-09-22 21:53:10 +02:00
Kubernetes Prow Robot
3b568bbe5d
Merge pull request #94232 from swetharepakula/multiple-services
Add e2e multiple endpoint services test
2020-09-22 12:23:00 -07:00
Matthew Fenwick
81219ca9d2 address review comments 2020-09-02 21:49:45 -04:00
Swetha Repakula
e6428ae214 Add e2e multiple endpoint services test
- ensures that when multiple services with the same selector will
 function even if one of the services is deleted
2020-09-01 16:36:33 -07:00
jay vyas
9ecf96cb46 Add maxTries logging statement, otherwise the numbers are really hard to interpret 2020-08-11 12:28:08 -04:00
jay vyas
56e2adbd79 implement breadth first try 2020-08-11 11:32:46 -04:00
jay vyas
ccbfa84173 golint
flip logging messages

run pod->node conformance tests the same way
2020-08-10 15:46:49 -04:00
jay vyas
84f7d1e636 e2e test intra-pod breadth first logging and summary
gofmt
2020-08-09 16:35:03 -04:00
Kubernetes Prow Robot
00da04ba23
Merge pull request #92163 from knight42/fix/large-cluster-network-e2e
fix(e2e::network): eliminate the dependency of external ips
2020-07-27 07:30:17 -07:00
Antonio Ojea
ec295c0f2a e2e networking: wait for endpoints to be published
e2e test wait for the endpoints objects to be created
2020-06-29 15:04:28 +02:00
knight42
1b9f11c9a9
fix(e2e): access nodes via test container in LB network tests
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-06-24 19:21:44 +08:00
Brian Pursley
dba85a5c95 Fixed wrong pod name in log messages 2020-06-18 10:10:10 -04:00
Mateusz Matejczyk
af00593679 Revert "fix(e2e): access nodes via test container in LB network tests"
This reverts commit 708fb6b457, https://github.com/kubernetes/kubernetes/pull/91559

It looks like the PR has broken other network tests - https://k8s-testgrid.appspot.com/sig-scalability-gce#gce-master-scale-correctness
2020-06-15 08:42:17 +02:00
knight42
708fb6b457
fix(e2e): access nodes via test container in LB network tests
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-06-09 14:32:31 +08:00
Yuiko Mori
9c87deb487 Move WaitForService() into e2eservice 2020-04-17 00:11:13 +00:00
Kubernetes Prow Robot
2fd8debe9b
Merge pull request #87926 from fedepaol/agnostsctp
Preliminary SCTP connectivity tests
2020-04-02 02:12:24 -07:00
Kenichi Omichi
62f3223dec Move BlockNetwork() to e2enetwork
for removing invalid dependency from e2e core framework to e2essh
subpackage and reducing test/e2e/framework/util.go code which is
one of huge files today.
2020-03-24 13:43:51 +00:00
tanjunchen
bed22fbb44 WaitForPodReady is simply wrapper functions for e2epod package,
and they made an invalid dependency to sub e2e framework from the core framework.

So we can use e2epod.WaitTimeoutForPodReadyInNamespace to remove invalid dependency.

The main purpose of this pr is to handle the framework core package dependency subpackage pod.
2020-03-22 23:08:52 +08:00
Kubernetes Prow Robot
a26f50a52e
Merge pull request #86679 from oomichi/remove-invalid-dependency-27
Use e2epod.WaitForPodNameRunningInNamespace directly
2020-03-20 15:58:44 -07:00
Kubernetes Prow Robot
fbdda693b4
Merge pull request #88796 from tanjunchen/remove-TODO-20200304
test/e2e/framework:remove TODO
2020-03-17 19:26:27 -07:00
Kenichi Omichi
2c8955fd4a Use e2epod.WaitForPodNameRunningInNamespace directly
WaitForPod*() are just wrapper functions for e2epod package, and they
made an invalid dependency to sub e2e framework from the core framework.
So this replaces WaitForPodRunning() with the e2epod function.
2020-03-17 00:13:14 +00:00
Mike Danese
aaf855c1e6 deref all calls to metav1.NewDeleteOptions that are passed to clients.
This is gross but because NewDeleteOptions is used by various parts of
storage that still pass around pointers, the return type can't be
changed without significant refactoring within the apiserver. I think
this would be good to cleanup, but I want to minimize apiserver side
changes as much as possible in the client signature refactor.
2020-03-05 14:59:46 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Federico Paolinelli
c42b1ca783 Add SCTP e2e connectivity tests.
Pod2pod connectivity, and pod 2 service.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
2020-03-04 23:34:22 +01:00
tanjunchen
453a05c03e test/e2e/framework:remove TODO 2020-03-04 13:00:37 +08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00