Commit Graph

302 Commits

Author SHA1 Message Date
Ciprian Hacman
1721be087d nodeport tests: node addresses must match the service IP family 2021-06-26 10:00:46 +03:00
Antonio Ojea
916dbc335c nodeport tests: node addresses must match the service IP family 2021-06-25 10:34:42 +02:00
Antonio Ojea
2dc4dba562 conformance test for Services should validate behavior
Current test for service with endpoints only validate the API objects,
however, doesn't validate that the implementation of Services works.

This mean that a cluster without any component implementing Services,
can pass Conformance.
2021-05-03 17:19:54 +02:00
Antonio Ojea
60c3480740 e2e don't set pod.Spec.NodeName directly
based on this comment in
ea07644522/test/e2e/framework/pod/node_selection.go (L96-L101)

// pod.Spec.NodeName should not be set directly because
// it will bypass the scheduler, potentially causing
// kubelet to Fail the pod immediately if it's out of
// resources. Instead, we want the pod to remain
// pending in the scheduler until the node has resources
// freed up.
2021-04-16 15:58:16 +02:00
Kubernetes Prow Robot
da341b5cfc
Merge pull request #100290 from ii/promote-service-status-test
Promote ServiceStatus lifecycle e2e test to Conformance  +4 endpoint coverage
2021-03-16 15:57:16 -07:00
Stephen Heywood
af1f64bee8 Promote ServiceStatus lifecycle e2e test to Conformance 2021-03-16 10:07:05 +13:00
Kubernetes Prow Robot
faa3a5fbd4
Merge pull request #99916 from swetharepakula/eps-ga-e2e
Promote Endpoint Slice E2E Tests to Conformance
2021-03-08 20:47:45 -08:00
Kubernetes Prow Robot
5f0b88b043
Merge pull request #98791 from pacoxu/kubetest/external-ips
skip checking nodeport on external addrs in conformance tests
2021-03-08 19:22:59 -08:00
Swetha Repakula
3ef94fbe3e Update e2e tests to use EndpointSlice v1 API 2021-03-08 09:44:47 -08:00
pacoxu
520ce44c55 skip test on External IP of NodePort in conformance test 2021-03-08 16:55:34 +08:00
Stephen Heywood
3e9c44f00e Add lifecycle e2e test for service status
e2e test validates the following service status endpoints
- patchCoreV1NamespacedServiceStatus
- readCoreV1NamespacedServiceStatus
- replaceCoreV1NamespacedServiceStatus

Also includes untested service endpoint
- patchCoreV1NamespacedService
2021-03-02 12:05:52 +13:00
wojtekt
749922fa46 Cleanup SIGDescribe in test/e2e/network 2021-02-27 20:29:27 +01:00
Antonio Ojea
c9cbe41347 remove duplicate functions 2021-02-22 18:43:59 +01:00
jornshen
5d8f7ccc56 e2e test use CreateSync in createPodOrFail 2021-02-20 18:14:12 +08:00
Kubernetes Prow Robot
83a5b4c365
Merge pull request #99202 from aojea/servicessyncpod
e2e services test pods should wait until they are ready
2021-02-19 00:20:48 -08:00
Antonio Ojea
6d614c9c50 e2e services test pods should wait until they are ready 2021-02-18 16:08:59 +01:00
jornshen
ffa7789f7f merge error check to validateEndpointsPorts 2021-02-17 18:22:09 +08:00
Antonio Ojea
63dce95fd2 e2e network test reorganization
the sig-network e2e tests related to services has more than 3k lines.
Some of those e2e tests are related to loadbalancers, that are
cloud provider specific and have special requirements.

We split up the services file and keeps the loadbalancers e2e tests
in their own file and with their own tag, so it is easier to skip
for people that don't run e2e tests in cloud providers.
2021-01-24 01:12:42 +01:00
wojtekt
fa0b7dee9e Attempt to deflake networking tests in large clusters 2021-01-20 09:32:39 +01:00
Antonio Ojea
6bedf4a98b don´t panic on e2e ESIPP tests
The ESIPP tests are using a function to poll an HTTP endpoint.
This function failed the framework if the request to the http endpoint
timed out, causing a panic that ginkgo couldn´t recover.

Also, this function was used inside a pollImmediate loop, so it should
return the error instead of fail.
2021-01-08 10:52:49 +01:00
Antonio Ojea
bbfed8a7db fix sctp hostPort test
The test create a pod with a hostPort to expose an SCTP port, then
it checks if the iptables rules were installed correctly in the host.

The iptables rules MUST be checked in the same host where the pod
is running :)
2020-12-17 18:31:35 +01:00
Mateusz Matejczyk
3affac239e Remove the 'DisabledForLargeClusters' tags from non-session-affinity LB network tests
Ref. https://github.com/kubernetes/kubernetes/issues/90047
2020-12-16 13:26:42 +01:00
DP19
9e4642211a add e2e test for Service ExternalIPs 2020-11-22 00:57:29 +01:00
Antonio Ojea
59674755eb e2e SCTP test not depend on kubenet
e2e test should be platform and component independent.
Consumers can filter using tags or regex.
2020-11-17 16:34:48 +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
Antonio Ojea
76a9c8695a Revert "add e2e test for Service ExternalIPs"
This reverts commit 0ed8fd6dc9.

It turns out that ExternalIPs are not allowed to be reachable from
pods until the IP is present in the node.
However, due to a kube-proxy limitation it was working in environment
that used CNIs without bridges for the pods.
2020-11-05 10:35:24 +01:00
Kubernetes Prow Robot
e54448a307
Merge pull request #96116 from DP19/add-e2e-test-for-external-ips
add e2e test for Service ExternalIPs
2020-11-03 17:04:17 -08:00
Kubernetes Prow Robot
e25f3d75b8
Merge pull request #95065 from JornShen/replace_restarting_kas_kp_e2e_network_provider
refector service some e2e cases to make it runing in multi providers
2020-11-03 17:04:03 -08:00
DP19
0ed8fd6dc9 add e2e test for Service ExternalIPs 2020-11-02 13:57:23 -05:00
jornshen
1d83b28dfe refector service some e2e cases to make it runing in multi providers
the cases are as fellow:
- "should work after restarting kube-proxy"
- "should work after restarting apiserver"
2020-10-30 19:39:02 +08:00
Tim Hockin
4f8fb1d3ca Wipe some fields on service "type" updates
Service has had a problem since forever:

- User creates a service type=LoadBalancer
- We silently allocate them a NodePort
- User changes type to ClusterIP
- We fail the operation because they did not clear NodePort

They never asked for or used the NodePort!

Dual-stack introduced some dependent fields that get auto-wiped on
updates.  This carries it further.

If you squint, you can see Service as a big, messy discriminated union,
with type as the discriminator. Ignoring fields for non-selected
union-modes seems right.

This introduces the potential for an apply loop. Specifically, we will
accept YAML that we did not previously accept. Apply could see the
field in local YAML and not in the server and repeatedly try to patch it
in. But since that YAML is currently an error, it seems like a very low
risk. Almost nobody actually specifies their own NodePort values.

To mitigate this somewhat, we only auto-wipe on updates. The same YAML
would fail to create. This is a little inconsistent. We could
auto-wipe on create, too, at the risk of more potential impact.

To do this properly, we need to know the old and new values, which means
we can not do it in defaulting or conversion. So we do it in strategy.

This change also adds unit tests and updates e2e tests to rely on and
verify this behavior.
2020-10-28 10:41:26 -07: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
Lion-Wei
624f5f9fdc extend request interval to make session affinity cases stable 2020-10-23 13:48:49 +08:00
Kubernetes Prow Robot
8058942aa2
Merge pull request #95574 from swetharepakula/disable-test
Disable ExternalTrafficPolicy Test for large clusters
2020-10-16 18:42:12 -07:00
Swetha Repakula
b38ff20f71 Disable test for large clusters
- Due to performance issues, service controller updates are slow
 in large clusters, causing failing tests. Tag can be removed once
 performance issues are resolved
2020-10-16 14:27:15 -07:00
Kubernetes Prow Robot
7b40b3410b
Merge pull request #94595 from claudiubelu/tests/agnhost-usage-refactor-5
tests: Refactor agnhost image pod usage - network
2020-10-16 09:01:40 -07:00
Antonio Ojea
33602279a2 e2e hostexec commands does not need sudo 2020-10-06 09:36:49 +02:00
Kubernetes Prow Robot
05b3e8911a
Merge pull request #95166 from vishsangale/master-to-control-plane-test-e2e-GetMasterHost
Updated symbol 'framework.GetMasterHost' to not use word 'master'
2020-10-01 11:49:19 -07:00
Vishwanath Sangale
395a6d89f6 Updated symbol 'framework.GetMasterHost' to not use word 'master' 2020-09-29 21:05:39 -07:00
Kubernetes Prow Robot
ac519b43bd
Merge pull request #94828 from aojea/sctpflake
Fix sctp job flakes
2020-09-28 18:29:25 -07:00
Claudiu Belu
d37cbeb388 tests: Refactors agnhost image pod usage - network
A previous commit created a few agnhost related functions that creates agnhost
pods / containers for general purposes.

Refactors tests to use those functions.
2020-09-26 05:56:31 -07:00
Kubernetes Prow Robot
9646d5998c
Merge pull request #94822 from JornShen/replace_e2essh_e2e_service_tests
Replace e2essh on e2e service tests
2020-09-24 13:57:11 -07:00
jornshen
40474d7e2a Replace e2essh on e2e service tests
test can execute whever hosts have ssh or not

relevant case:

"should be able to up and down services"
"should implement service.kubernetes.io/service-proxy-name"
"should implement service.kubernetes.io/headless"
2020-09-23 19:21:57 +08:00
Claudiu Belu
89eae73323 tests: Refactors agnhost image pod usage in tests
A previous commit created a few agnhost related functions that creates agnhost
pods / containers for general purposes.

Refactors tests to use those functions.
2020-09-22 13:09:49 -07:00
Antonio Ojea
1dbf915e7b wait until the iptables rules are programmed 2020-09-22 15:50:22 +02:00
Antonio Ojea
3eeed2f7fe e2e sctp support for ipv6 2020-09-16 11:47:11 +02:00
Kubernetes Prow Robot
cf6a0868be
Merge pull request #93597 from wojtek-t/validate_endpoint_slices
Wait for both endpoints and endpointslices in e2e tests
2020-08-01 20:22:04 -07:00
knight42
7b07b33094
fix(e2e::network): refactor NoSNAT test
Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-08-01 00:51:51 +08:00
wojtekt
76b3fe7f6d Wait for both endpoints and endpointslices in e2e tests 2020-07-31 17:24:53 +02:00
Jefftree
ace97738e2 Update formatting of conformance comment 2020-07-29 20:50:44 -07:00
Kubernetes Prow Robot
d2d8c63a87
Merge pull request #90939 from ii/ii-promote-endpoint-resource-lifecycle-test
Promote Endpoints resource lifecycle test - +4 endpoint coverage
2020-07-28 16:31:47 -07: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
Caleb Woodbine
e311df70e1 Promote Endpoint resource lifecycle test 2020-07-27 09:11:42 +12:00
Caleb Woodbine
c9acca7c48 Update and improve Endpoints resource lifecycle test 2020-07-23 08:42:07 +12:00
wojtekt
3c34b56fbf Improve LB session affinity tests 2020-06-26 10:59:00 +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
wojtekt
8816b8fce4 Attempt to delfake further conntract e2e flakes 2020-06-22 13:43:58 +02:00
Kubernetes Prow Robot
8dbca91cae
Merge pull request #91962 from aojea/udp1
Deflake Services should be able to preserve UDP traffic when server pod cycles for a NodePort service
2020-06-16 19:22:53 -07:00
Antonio Ojea
27d32661c2 e2e conntrack tests
deflake current e2e test
"should be able to preserve UDP traffic when server pod cycles for a
NodePort service" and reorganize the code in the e2e framework

Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2020-06-15 10:30:00 +02: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
Laszlo Janosi
3ce43a1c96 Add e2e test for SCTP Service, Pod and Endpoint creation.
Add SCTP NetworkPolicy test.
2020-05-28 19:51:27 +00:00
Jacob Tanenbaum
59082e80e3 Add a test that checks if conntrack entries are cleaned up for UDP traffic
ensure that when a pod servicing UDP traffic is deleted the conntrack entries
are cleaned up and another backend can pick up the traffic  with minimal
interruption

When using NodePort services and long running connections that on pod deletion
stale conntrack entries can halt the flow of traffic. Add a test case to check
that conntrack entries are cleaned up.
2020-05-13 16:45:58 -04:00
wojtekt
da1ed9d1ed Enable couple networking tests for large clusters 2020-04-20 21:11:34 +02:00
SataQiu
fc3d282b10 kube-proxy: increase the session affinity timeout to ensure that the test passes in ipvs mode
Signed-off-by: SataQiu <1527062125@qq.com>
2020-04-20 10:22:30 +08:00
Kubernetes Prow Robot
da5e6ad347
Merge pull request #90052 from tosi3k/reenable-ilb-test
Remove the 'DisabledForLargeClusters' tag from ILB correctness test
2020-04-16 02:14:45 -07:00
Wojciech Tyczynski
5dca58d852
Revert "Remove the 'DisabledForLargeClusters' tags from LB network tests." 2020-04-15 13:45:42 +02:00
Antoni Zawodny
4030da9e34 Remove the 'DisabledForLargeClusters' tag from ILB correctness test 2020-04-10 13:55:15 +02:00
Kubernetes Prow Robot
53ffaa7175
Merge pull request #76443 from mgdevstack/promote-service-sessionaffinity
Promote e2e "verifying service's sessionAffinity for ClusterIP and NodePort services" to Conformance
2020-04-07 18:47:44 -07:00
Mayank Gaikwad
7aa94a6549 Promote e2e verifying service's session affinity behaviours 2020-04-06 21:42:22 +05:30
Mateusz Matejczyk
0817af735c Remove the 'DisabledForLargeClusters' tags from ELB network tests.
We did some internal testing at Google and, with the recent improvements, we believe that it's safe to re-enable these LB tests for large clusters.

Ref. https://github.com/kubernetes/kubernetes/issues/56138
2020-04-06 14:36:56 +02:00
Kubernetes Prow Robot
7bd48eb3f6
Merge pull request #89784 from oomichi/sshPort
Add common SSHPort on e2essh
2020-04-02 21:40:40 -07:00
Kenichi Omichi
48fdb95a82 Add common SSHPort on e2essh
There were several sshPort values in e2e test packages because
we've migrated code from e2e framework by copying and pastting.
This adds common SSHPort on e2essh package to reduce such duplicated
code.
2020-04-02 17:41:49 +00:00
wojtekt
268b51d023 Cleanup and fix networking test timeouts for large clusters 2020-04-02 17:19:41 +02:00
wojtekt
4c5a963463 Cleanup timeouts for networking tests 2020-04-02 16:30:40 +02:00
Kubernetes Prow Robot
ed00f42848
Merge pull request #89563 from oomichi/RestartControllerManager
Separate RestartControllerManager() as e2ekubesystem
2020-04-01 13:42:23 -07:00
Kubernetes Prow Robot
1b7f5662e1
Merge pull request #89215 from k-toyoda-pi/use_expectnotequal_service
Use ExpectNotEqual in test/e2e/network/
2020-03-31 14:15:28 -07:00
Kubernetes Prow Robot
4e9dd8fd36
Merge pull request #89454 from gavinfish/import-aliases
Update .import-aliases for e2e test framework
2020-03-27 14:35:54 -07:00
Kenichi Omichi
42bb845f40 Separate RestartControllerManager() as e2ekubesystem
RestartControllerManager() is kube-controller specific function
and it is better to separate the function as subpackage of e2e
test framework.
In addition, the function made invalid dependency into e2essh.
So this separates the function into e2ekubesystem subpackage.
2020-03-27 03:52:17 +00:00
Kubernetes Prow Robot
f022274d8c
Merge pull request #88778 from ii/create-endpoints-resource-lifecycle-test
Create Endpoints resource lifecycle test - +5 endpoint coverage
2020-03-26 11:13:50 -07:00
Kenichi Omichi
7398c83afd Move RestartApiserver() into e2e/network
The function is called from e2e/network test only, so this moves
the function into the test for reducing e2e/framework/util.go code
and removing invalid dependency on e2e test framework.
2020-03-25 20:23:25 +00:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Caleb Woodbine
f64d348505 Update DeleteOptions 2020-03-25 11:22:31 +13:00
Caleb Woodbine
58c532b968 Update name of watchEvent and comment on timeout for watch 2020-03-25 11:05:40 +13:00
Kenichi Omichi
5c77461733 Move NewAgnhostPod() to e2e/network
because the function is called in e2e/network tests only.
2020-03-24 05:46:49 +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
toyoda
7499d80fd8 Use ExpectNotEqual in test/e2e/network/ 2020-03-18 16:30:56 +09:00
Mike Danese
76f8594378 more artisanal fixes
Most of these could have been refactored automatically but it wouldn't
have been uglier. The unsophisticated tooling left lots of unnecessary
struct -> pointer -> struct transitions.
2020-03-05 14:59:47 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Caleb Woodbine
bf4f46b9fa Adjust endpoint watch timeout to 180 2020-03-05 10:24:25 +13:00
Caleb Woodbine
be382a812c Update test to create endpoint, patch addresses and ports for endpoint, ensure watch for DELETED 2020-03-04 14:24:02 +13:00
Caleb Woodbine
de5859f7ce Add Endpoints resource lifecycle test 2020-03-04 11:09:48 +13:00
Antonio Ojea
64c4876ccd
Add e2e session affinity timeout test
The service session affinity allows to set the maximum session
sticky timeout.
This commit adds e2e tests to check that the session is sticky
before the timeout and is not after.
2020-02-24 09:48:18 +01:00
Antonio Ojea
e268f033b6
Revert "Mark session affinity tests as [Flaky]"
This reverts commit f00ac0694b.
2020-02-24 09:48:18 +01:00
Antonio Ojea
457c05feb8
deflake e2e session affinity tests
Executing commands in pods is expensive in terms of time and the
execution time is unpredictable and random.
The session affinity tests send several http requests from a pod
to check that the session is sticky. Instead of executing one
http request at a time, we can execute several requests from the
pod at one time and process the output.
2020-02-24 09:48:18 +01:00
Kubernetes Prow Robot
921ef35e64
Merge pull request #87949 from 928234269/non_ascii_01
Fix non-ascii characters in test/e2e_node and test/network.
2020-02-10 17:22:01 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Sakura
44bf3475ea
Fix non-ascii characters in test/e2e_node and test/network.
Signed-off-by: Sakura <longfei.shang@daocloud.io>
2020-02-08 17:47:19 +08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Mike Danese
d55d6175f8 refactor 2020-01-29 08:50:45 -08:00