Commit Graph

1238 Commits

Author SHA1 Message Date
Dan Winship
8e8bef66f6 Refactor endpoint/execpod antiaffinity
Also make launchHostExecPod return a fully-filled-in Pod object.
2024-09-11 14:21:55 -04:00
Antonio Ojea
2c38ae726a fix typo on ServiceCIDR e2e test title 2024-09-09 11:06:52 +00:00
Antonio Ojea
93aa0b056e add feature gate to ServiceCIDR e2e test 2024-09-09 11:06:33 +00:00
Antonio Ojea
e90b6b969e fix spelling error 2024-09-08 14:00:09 +00:00
Antonio Ojea
f299473ce4 fix linter errors 2024-09-08 12:32:11 +00:00
Antonio Ojea
853b24b398 adapt iperf2 parser to new version format 2024-09-08 11:47:33 +00:00
Daman Arora
3a942490b5 e2e/network/proxy: fix e2e assertions
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-08-23 20:46:21 +05:30
Dan Winship
a3b97b118b Fix the localhost nodeport metrics test to not fail under non-kube-proxy
If the cluster is using a non-kube-proxy service proxy, the `curl`
will presumably fail; this should not be considered a hard failure.
2024-08-21 09:44:42 -04:00
Antonio Ojea
046e976bab cap the num of nodes on the noSNAT test and remove slow and NoSNAT tag
run NoSNAT network test between pods without any feature tag
2024-07-23 16:27:11 +00:00
Antonio Ojea
fdbe6912d2 e2e: fix flake on loadbalancer tests
validating that one endpoint is reachable from one part of the cluster
is not enough condition to consider it will be reachable from any node,
as different Services proxies on different nodes will have different
propagation delays for the EndpointSlices and Services information.
2024-07-18 12:54:54 +00:00
joey
47133919e7 add some notes for e2e preserve source pod ip test
Signed-off-by: joey <zchengjoey@gmail.com>
2024-07-16 10:18:05 +08:00
jeffinkottaram
f57d67c847 Fix should complete a service status lifecycle test
Fix `[sig-network] Services [It] should complete a service status
lifecycle [Conformance]` not iterating through all `Conditions` in
status, causing failure when a `Condition` already exists.

Log Conditions instead of Loadbalanacer.
2024-07-08 01:15:14 -04:00
Kubernetes Prow Robot
93d56511e6 Merge pull request #125021 from aojea/servicecidrbeta
KEP-1880 Multiple Service CIDRs: Graduate to Beta (2/2)
2024-06-30 08:53:25 -07:00
Antonio Ojea
ed597316d6 modify tests to use the networking v1beta1 API 2024-06-30 09:48:46 +00:00
Davanum Srinivas
a88dc632a4 kube-apiserver: default --enable-logs-handler flag to false
Co-Authored-By: Iceber Gu <wei.cai-nat@daocloud.io>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-28 15:22:22 -04:00
yintong.huang
2db1b321e0 drop deprecated PollWithContext and adopt PollUntilContextTimeout instead
Signed-off-by: yintong.huang <yintong.huang@daocloud.io>
2024-06-21 19:23:31 +08:00
Daman Arora
9fd1a21693 e2e/framework/metrics: handle index out of bounds panic
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-06-15 00:42:11 +05:30
Kubernetes Prow Robot
e67f889edc Merge pull request #125015 from aroradaman/proxy-localhost-nodeports-metric
Kube-Proxy: Track packets accepted on localhost nodeports
2024-06-04 18:49:11 -07:00
Kubernetes Prow Robot
e6e39db4c1 Merge pull request #125203 from danwinship/kind-loadbalancers-2
Fix eTP:Local NodePort test
2024-05-30 16:06:02 -07:00
Dan Winship
fff883ab4a Improve eTP:Local NodePort test
It previously assumed that pod-to-other-node-nodeIP would be
unmasqueraded, but this is not the case for most network plugins. Use
a HostNetwork exec pod to avoid problems.

This also requires putting the client and endpoint on different nodes,
because with most network plugins, a node-to-same-node-pod connection
will end up using the internal "docker0" (or whatever) IP as the
source address rather than the node's public IP, and we don't know
what that IP is.

Also make it work with IPv6.
2024-05-30 11:43:07 -04:00
Dan Winship
d01b264345 Improve LoadBalancerSourceRanges test
The existing test had two problems:

  - It only made connections from within the cluster, so for VIP-type
    LBs, the connections would always be short-circuited and so this
    only tested kube-proxy's LBSR implementation, not the cloud's.

  - For non-VIP-type LBs, it would only work if pod-to-LB connections
    were not masqueraded, which is not the case for most network
    plugins.

Fix this by (a) testing connectivity from the test binary, so as to
test filtering external IPs, and ensure we're testing the cloud's
behavior; and (b) using both pod and node IPs when testing the
in-cluster case.

Also some general cleanup of the test case.
2024-05-30 07:24:36 -04:00
Dan Winship
41527afe28 Move eTP:Local NodePort test from loadbalancer.go to service.go
(And in particular, remove `[Feature:LoadBalancer]` from it.)
2024-05-29 16:21:36 -04:00
Dan Winship
5230bab600 Convert test/e2e/network/service.go to utils/ptr 2024-05-29 16:21:34 -04:00
Antonio Ojea
5221df5074 add logging on e2e loadbalancer test 2024-05-23 23:32:08 +00:00
Daman Arora
2e669de458 test/e2e/network: test for localhost nodeport metric update
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-05-22 17:52:40 +05:30
Sean Sullivan
cc9b4f47aa Export PokeUDP helper function 2024-05-15 20:30:48 -07:00
Kubernetes Prow Robot
8362f51c66 Merge pull request #124876 from danwinship/kind-loadbalancers-1
e2e-kind-cloud-provider-loadbalancer fixes, part 1
2024-05-15 07:09:53 -07:00
Sascha Grunert
104b5a0f2c Fix assertion for host network hostname e2e test
The original assumption is wrong, as the node name may not match the
hostname of the host in some circumstances.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-05-13 14:36:10 +02:00
Dan Winship
85d5b4bd4a Skip source IP preservation checks for Proxy-type load balancers
To be revisited
2024-05-11 08:32:41 -04:00
Dan Winship
79394a1cbd Don't require ICMP reject on UDP LB with no endpoints
Allow either drop or reject; we previously made the same change for
TCP load balancers.
2024-05-11 08:32:41 -04:00
Kubernetes Prow Robot
d36b267023 Merge pull request #124660 from danwinship/feature-loadbalancer
Fix LoadBalancer tests to be provider-agnostic
2024-05-09 01:23:11 -07:00
Kubernetes Prow Robot
7ac9237b89 Merge pull request #124725 from aojea/e2e_network_test
Debug E2e network test flake
2024-05-08 04:15:45 -07:00
Kubernetes Prow Robot
74ae6d1b4b Merge pull request #124428 from yashsingh74/yashsingh/hostname-test
Added a testcase to check hostname and hostNetwork
2024-05-07 20:42:54 -07:00
Dan Winship
67e0c519e3 Fix references to "ESIPP" and "OnlyLocal" in network e2e tests 2024-05-07 21:11:13 -04:00
Dan Winship
2d5f148d4a Add feature.LoadBalancer and remove provider-based skips from LB tests 2024-05-07 21:11:13 -04:00
Dan Winship
582a49599a Update the "new" code to pass current lint 2024-05-07 21:11:07 -04:00
Dan Winship
b421bde1de Drop GCE-only tests and subtests from LoadBalancer tests 2024-05-07 11:33:26 -04:00
Dan Winship
35a8c0fb3f Add back the previously-removed loadbalancer e2e tests
(No changes from before they were deleted, and thus they don't
actually compile because of missing provider code.)
2024-05-07 11:31:32 -04:00
Antonio Ojea
ff8573343c Revert "e2e/network: stream pod logs for debugging"
This reverts commit d70f96fe22.
2024-05-07 08:53:27 +00:00
Davanum Srinivas
7187d9af81 address comments during review
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 18:01:25 -04:00
Davanum Srinivas
efdb2961b6 drop unused code pointed out by linter
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 09:03:57 -04:00
Davanum Srinivas
bf268f02a3 Remove gcp in-tree cloud provider and credential provider
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 09:03:53 -04:00
Daman Arora
d70f96fe22 e2e/network: stream pod logs for debugging
Intermittent logging to understand root cause of
https://github.com/kubernetes/kubernetes/issues/123760

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-05-01 11:27:11 +05:30
Yash Kumar Singh
091a05b1cb Added a testcase to check hostname and hostNetwork 2024-04-29 11:09:59 +05:30
Antonio Ojea
484f8bc54b tag TrafficDistribution tests to avoid running on clusters without the feature enabled 2024-04-26 17:15:35 +00:00
Kubernetes Prow Robot
7fa3098a9d Merge pull request #124161 from aojea/lb_timeout
fix e2e loadbalancer test timeouts and assumptions
2024-04-23 09:29:16 -07:00
huweiwen
6ec421e2cf test/e2e: do not use global variable for image
We have "-kube-test-repo-list" command line flag to override the image registry. If we store it in global variable, then that overriding cannot take effect.

And this can cause puzzling bugs, e.g.: containerIsUnused() function will compare incorrect image address.
2024-04-22 19:29:39 +08:00
Dan Winship
a1c1ef31df Remove unnecessary e2e feature.UDP
[Feature:UDP] was probably added in the past by analogy to
[Feature:SCTP], but is unnecessary since UDP support has always been
required.
2024-04-20 10:02:59 -04:00
Antonio Ojea
9a40ea2e28 fix e2e loadbalancer test timeouts and assumptions
Change-Id: Ie9e30ef8e0b20863210bd4a2b5c12e1709654b76
2024-04-03 08:03:44 +00:00
Gaurav Kumar Ghildiyal
6680700b5d Add e2e and integration tests for Service.spec.trafficDistribution (#123812)
* Add e2e tests for Service.spec.trafficDistribution

* Fix linting issue

* Fix spelling

* Add integration tests for trafficDistribution

* Use nodeSelection instead of nodeName to schedule pods on a specific zonal node

* Fix import alias corev1 -> v1 in e2e test

* Address comments

* Add a way to only print log lines in case of errors. This is deemed to be good behaviour by e2e tests guidelines
2024-03-13 14:46:21 -07:00