Skip to content

Conversation

dylandreimerink
Copy link
Member

@dylandreimerink dylandreimerink commented Apr 4, 2025

This PR adds fake external targets to the conformance-kind-proxy-embedded workflow. It introduces reusable github actions to be used by other workflows in the future and a number of cilium-cli modifications.

The reason for doing the above is to enable IPv6 testing of our to-fqdn tests. These tests require connectivity to the external targets. Since github does not provide IPv6 connectivity, we cannot simply enable IPv6 traffic to the existing default external targets (one.one.one.one and k8s.io). So to allow us to do IPv6 testing to external targets, we need to stop using actual external targets and use fake external targets instead. Another positive side effect is that this should make our tests that require external targets less flaky, since we remove internet connectivity and uptime of external services as possible reasons why our tests might fail.

These fake external targets are simply docker containers which are added to the same bridge network as the kind nodes. From the perspective of these kind nodes, the external targets are like servers in the same L2 network which are not part of the k8s cluster. They are reachable over the same eth0 interface as targets on the internet. The CoreDNS config is modified to add DNS entries for the external targets. The external targets are assigned IPs which both live in the same CIDR, but one which does not cover the IPs used by the kind hosts. Both external targets are nginx webservers, listening on port 80 and 443, serve HTTP and HTTPS with a certificate signed by a self signed CA. The cert of the CA is put into a k8s secret so it can be used by the tests.

The connectivity tests are modified so custom CA is added to the client CA bundle when provided. IPv6 testing is enabled for PodToWorld, PodToWorld2 and PodToCIDR, except for when L7 proxy is used (see #37932), and only when the new external-target-ipv6-capable flag is set. This new flag allows us to enable IPv6 with fake external targets, while keeping it disabled for existing workflows without fake external targets.

For now only the conformance-kind-proxy-embedded workflow has these fake external targets. That is because it is low hanging fruit, it executes a large range of connectivity tests, including the FQDN tests. It also uses kind directly on the runner as opposed to in LVH. Using these fake external targets should also be possible in LVH, but we need to execute the scripts inside of the VM, something which requires a bit more work, and so is left for a follow up PR.

Fixes: #37138
Fixes: #37139

@dylandreimerink dylandreimerink added dont-merge/preview-only Only for preview or testing, don't merge it. release-note/ci This PR makes changes to the CI. labels Apr 4, 2025
@dylandreimerink dylandreimerink force-pushed the pr/dylandreimerink/cilium-connectivity-fqdn-dual-stack branch 27 times, most recently from 2174760 to 664ec56 Compare April 9, 2025 15:45
@dylandreimerink
Copy link
Member Author

/test

This commit adds IPv6 external target IP, other external target IP and
external CIDR parameters to the cilium-cli connectivity test. And added
them to the `PodToCIDR` scenario and all tests that use it.

The IPv6 variation of `PodToCIDR` is only enabled when the external
targets are IPv6 capable.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
To validate that adding fake external targets works, we use them in
the `conformance-kind-proxy-embedded` workflow. This workflow was mostly
chosen because it enables a large amount of tests and runs kind
directly on the runner instead of in LVH.

The actions will not work for kind clusters in LVH as is since they
execute in the context of the runner and they need to run in the
context of the LVH VM for those instead. This is something to be
addressed in a future change.

Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
@dylandreimerink dylandreimerink force-pushed the pr/dylandreimerink/cilium-connectivity-fqdn-dual-stack branch from 41e6067 to 5bb5f0a Compare April 11, 2025 13:21
@dylandreimerink
Copy link
Member Author

/test

@dylandreimerink dylandreimerink marked this pull request as ready for review April 11, 2025 14:49
@dylandreimerink dylandreimerink requested review from a team as code owners April 11, 2025 14:49
Copy link
Member

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting CI extension! Can't wait to see the 1.1.1.1 flakes disappear :)

@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Apr 22, 2025
@dylandreimerink dylandreimerink added this pull request to the merge queue Apr 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 23, 2025
@dylandreimerink dylandreimerink added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit 6982ed9 Apr 23, 2025
312 of 314 checks passed
@dylandreimerink dylandreimerink deleted the pr/dylandreimerink/cilium-connectivity-fqdn-dual-stack branch April 23, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
5 participants