Commit Graph

1257 Commits

Author SHA1 Message Date
Antonio Ojea
2c23db7311 don't panic inside e2e test 2024-11-02 13:51:46 +00:00
Antonio Ojea
e973b05f89 Revert "Don't stop the next poll when it fails to grab logs" 2024-11-02 09:50:11 +01:00
carlory
bd0c5a40f8 Don't stop the next poll when it fails to grab logs 2024-11-02 13:31:36 +08:00
Kubernetes Prow Robot
f94f87795f Merge pull request #126935 from aojea/proxy_conntrack_service_topology
e2e conntrack test for UDP Service with internalTrafficPolicy local
2024-10-31 10:21:26 +00:00
Patrick Ohly
e43065d542 e2e daemon set: better polling in CheckDaemonStatus
As a quick fix for a flake, bceec5a3ff
introduced polling with wait.Poll in all callers of CheckDaemonStatus.

This commit reverts all callers to what they were before (CheckDaemonStatus +
ExpectNoError) and implements polling according to E2E best practices
(https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/writing-good-e2e-tests.md#polling-and-timeouts):

- no logging while polling
- support for progress reporting while polling
- last but not least, produce an informative failure message in case of a
  timeout, including a dump of the daemon set as YAML
2024-10-15 10:12:28 +02:00
Antonio Ojea
bceec5a3ff e2e flake CheckDaemonStatus assert on async value
The util for checking on daemonstatus was checking once if the Status of
the daemonset was reporting that all the desired Pods are scheduled and
ready.

However, the pattern used in the e2e test for this function was not
taking into consideration that the controller needs to propagate the Pod
status to the DeamonSet status, and was asserting on the condition only
once after waiting for all the Pods to be ready.

In order to avoid more churn code, change the CheckDaemonStatus
signature to the wait.Condition type and use it in a async poll loop on
the tests.
2024-10-14 13:30:03 +00:00
Kubernetes Prow Robot
dc481fef90 Merge pull request #123981 from lzhecheng/update-traffic-distribution-test
[e2e] Update traffic distribution test
2024-10-01 15:53:49 +01:00
Kubernetes Prow Robot
f2700895a4 Merge pull request #127422 from srivastav-abhishek/go-vet-fix
Go vet fixes for gotip
2024-09-20 14:37:58 +01:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
Tim Hockin
a9189735ac Rename DNS tests and restructure
Get rid if "wheezy" (it's not wheezy) and set it up to process an
arbitrary list of probers, but stop short of adding more.
2024-09-17 12:39:53 -07:00
Tim Hockin
094a11b5cb Revert "Clean up DNS e2e wrt Jessie/Wheezy"
This reverts commit eeb36da2b97e87b3534c7bece9355cefc6f16472.
2024-09-17 10:12:54 -07:00
Tim Hockin
b228aebaf2 Clean up DNS e2e wrt Jessie/Wheezy 2024-09-17 10:12:53 -07:00
Kubernetes Prow Robot
bfd91fbb3e Merge pull request #125222 from danwinship/kind-loadbalancers-4
Fix "updates to ExternalTrafficPolicy" test
2024-09-17 14:05:14 +01:00
Antonio Ojea
79ef4668cd remove obsolete test ClusterDns [Feature:Example] [Feature:Networking-IPv4] should create pod that uses DNS 2024-09-17 09:11:11 +00:00
Dan Winship
a6b08a8ea4 Refactor "updates to ExternalTrafficPolicy" test
The LoadBalancer test "should handle updates to ExternalTrafficPolicy
field" had a bunch of problems, but the biggest is that (without doing
[Disruptive] things to the cluster or making unwarranted assumptions
about source IPs) it's very hard to *prove* that the cloud load
balancer is doing Cluster traffic policy semantics (distributing
connections to all nodes) rather than Local (distributing only to
nodes with endpoints).

So split the test into 2 new tests with more focused semantics:

  - "should implement NodePort and HealthCheckNodePort correctly when
    ExternalTrafficPolicy changes" (in service.go) tests that the
    service proxy is correctly implementing the proxy side of
    Cluster-vs-Local traffic policy for LoadBalancer Services, without
    testing the cloud load balancer itself at all.

  - "should target all nodes with endpoints" (in loadbalancer.go)
    complements the existing "should only target nodes with
    endpoints", to ensure that when a service has
    `externalTrafficPolicy: Local`, and there are endpoints on
    multiple nodes, that the cloud is correctly configured to target
    all of those endpoints, not just one.
2024-09-16 18:17:09 -04:00
Antonio Ojea
b98a3fef37 e2e test ClusterDns [Example] does not support IPv6 2024-09-15 07:27:50 +00:00
Adrian Moisey
8e3adc4df6 KEP-4427 : AllowRelaxedDNSSearchValidation (#127167)
* KEP-4427 : AllowRelaxedDNSSearchValidation

* Add e2e test with feature gate to test KEP-4427 RelaxedDNSSearchValidation

* Add more validatePodDNSConfig test cases

Also update Regex to match the case we want.

Thanks Tim and Antonio!
2024-09-12 09:41:19 +01:00
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
Antonio Ojea
7e9442264b e2e regression test for Service with internalTrafficPolicy local 2024-08-28 14:22:53 +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
Zhecheng Li
6a77140cb0 [e2e] Update traffic distribution test
Skip traffic distribution test if cluster has < 3 zones.

Signed-off-by: Zhecheng Li <zhechengli@microsoft.com>
2024-05-27 03:02:34 +00: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