Skip to content

Conversation

gentoo-root
Copy link
Contributor

Use fake external target in LVH-based workflows.

@gentoo-root gentoo-root added the release-note/ci This PR makes changes to the CI. label Jul 22, 2025
@gentoo-root
Copy link
Contributor Author

/test

@gentoo-root gentoo-root marked this pull request as ready for review July 22, 2025 13:54
@gentoo-root gentoo-root requested review from a team as code owners July 22, 2025 13:54
Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you for the work

Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Two comments below, but none of them blocking.

You have a merge conflict to address, though.

Thanks!

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.

I probably have less background on the recent work for external targets than other reviewers and, maybe because of that, I'm currently unable to review the main changes here.

I think this pull request and its commits need more context, to help me review and future debuggers understand. I've left comments to try and state what is unclear to me, but in general I'd expect the Why to be stated for each commit and, if the changes don't trivially relate to the commit's title/description, additional explanation for what's non-obvious (cf. Quentin's comment for an example).

@gentoo-root gentoo-root force-pushed the pr/max/lvh-fake-external-target branch from 152914a to 6312e43 Compare August 6, 2025 13:22
@gentoo-root gentoo-root requested a review from pchaigno August 6, 2025 13:22
@gentoo-root gentoo-root force-pushed the pr/max/lvh-fake-external-target branch 2 times, most recently from 9f0b54b to 7dfe134 Compare August 6, 2025 13:45
@gentoo-root
Copy link
Contributor Author

/test

@gentoo-root gentoo-root force-pushed the pr/max/lvh-fake-external-target branch from 7dfe134 to 1576a7b Compare August 13, 2025 15:21
@gentoo-root
Copy link
Contributor Author

/test

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.

Thanks a lot Maxim! The new commit descriptions help a lot for review and it all looks good to me :)

@pchaigno pchaigno enabled auto-merge August 13, 2025 21:41
.github/actions/kind-external-network/action.sh passes
KIND_EXPERIMENTAL_DOCKER_NETWORK to kind, but our wrapper script
overwrites it unconditionally and doesn't provide a way to change it.

Make the script check whether KIND_EXPERIMENTAL_DOCKER_NETWORK might be
already set.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Canonicalize IP6EXTERNALRANGE to fix this warning:

[=] [cilium-test-2] Test [all-egress-deny-knp] [3/21]
I0526 13:40:09.838874       1 warnings.go:110] "Warning: spec.egress[0].to[1].ipBlock.cidr: IPv6 CIDR value \"fd00:10:64::ffff:00/112\" should be in RFC 5952 canonical format (\"fd00:10:64::ffff:0/112\")"

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Recently, we started replacing real external targets (such as
one.one.one.one) in test workflows with fake ones to increase robustness
in case the servers that we don't control go down.

Commit 6982ed9 (".github/workflows: Use fake targets in
conformance-kind-proxy-embedded") mentions that the new GitHub actions
kind-external-network and kind-external-targets don't work with
little-vm-helper. The reason is that those actions, as implemented
initially, called into Docker from the GHA context, but Docker runs
inside a VM in LVH-based workflows. The change made here allows those
GitHub actions to SSH into the VM before running Docker commands.

To support Docker volume mounts both on the host and inside the VM, use
relative paths and cd /host in the VM to get into the same directory.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
Enabling fake external targets in LVH-based workflows makes this IPv6
NodePort test fail:

north-south-loadbalancing-with-l7-policy-port-range/outside-to-nodeport

tcp_checksum_complete fails in tcp_v6_rcv, and TCP_MIB_CSUMERRORS
increases with every IPv6 SYNACK.

While it's not clear why it passed in other workflows and how setting
the bridge name explicitly affects the checksums, adding this magic line
is sufficient to make this test pass in LVH-based workflows.

The bridge name chosen is not arbitrary, and it matches the config used
by contrib/scripts/kind.sh.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
check-encryption-leaks.bt treats everything under fd00::/8 as pod
traffic. This CIDR includes the actual external and node-to-node traffic
in configurations with fake external target.

Change the IPv6 subnet in those configurations to match the default used
by contrib/scripts/kind.sh.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
.github/actions/kind-external-targets/action.sh patches the cluster-wide
DNS to be able to resolve the hostnames of the fake external targets in
the cilium TLD.

Some LVH-based workflows use node-local DNS that doesn't know about the
cilium TLD, therefore, it'll fail to resolve the fake external targets
once they are enabled for LVH-based workflows.

Patch the node-local DNS config to forward requests in the cilium TLD to
the cluster-wide DNS server, which is capable of resolving the hostnames
of the fake external targets.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
EXTRA_CLI_FLAGS is formed as an array, each element corresponding to a
command line argument. However, if an argument contains spaces, we have
to quote the element of the array manually. Alleviate this burden by
applying shell quoting with @q when expanding the array into a string.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
@gentoo-root gentoo-root force-pushed the pr/max/lvh-fake-external-target branch from 1576a7b to 6c96b33 Compare August 14, 2025 12:21
@gentoo-root
Copy link
Contributor Author

/test

@pchaigno pchaigno added this pull request to the merge queue Aug 15, 2025
@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 Aug 15, 2025
Merged via the queue into main with commit 5cbf6c7 Aug 15, 2025
345 of 357 checks passed
@pchaigno pchaigno deleted the pr/max/lvh-fake-external-target branch August 15, 2025 13:04
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
Development

Successfully merging this pull request may close these issues.

4 participants