Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add e2e test for SupportBundleCollection for K8s Nodes #6866

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antoninbas
Copy link
Contributor

The SupportBundleCollection CRD can be used to collect support bundle files and upload them to a file server. It supports both K8s Nodes and VMs (External Nodes). Prior to this change, we would only test the VM case. The SupportBundleCollection e2e test for VMs cannot easily be run locally on a Kind cluster, which makes it impractical for development. The corresponding CI job (which runs the e2e test) also has to be triggered manually, which means it is not always run for all PRs, which can cause breakage.

This change introduces a new SupportBundleCollection e2e test, which only collects bundles from K8s Nodes. The test can be run locally on a Kind cluster, as long as Antrea is installed with the SupportBundleCollection Feature Gate enabled.

We also use a uniform mechanism to deploy an SFTP server for e2e tests. hack/externalnode/sftp-deployment.yml is no longer used for e2e tests, and the necessary Deployment / Service are created programmatically, using the same mechanism as for existing PacketCapture tests.

Finally, we add a new e2e test case for the PacketCapture feature, to test the case where an unexpected public host key is provided in the PacketCapture CR (the key does not match any of the server's keys).

Note that as part of this change, the toolbox image is updated to 1.5-0, as the curl command included with ubuntu 22.04 seems to have issues with SFTP (the 1.5 version of the image is based on ubuntu 24.04).

The SupportBundleCollection CRD can be used to collect support bundle
files and upload them to a file server. It supports both K8s Nodes and
VMs (External Nodes). Prior to this change, we would only test the VM
case. The SupportBundleCollection e2e test for VMs cannot easily be run
locally on a Kind cluster, which makes it impractical for
development. The corresponding CI job (which runs the e2e test) also has
to be triggered manually, which means it is not always run for all PRs,
which can cause breakage.

This change introduces a new SupportBundleCollection e2e test, which
only collects bundles from K8s Nodes. The test can be run locally on a
Kind cluster, as long as Antrea is installed with the
SupportBundleCollection Feature Gate enabled.

We also use a uniform mechanism to deploy an SFTP server for e2e
tests. hack/externalnode/sftp-deployment.yml is no longer used for e2e
tests, and the necessary Deployment / Service are created
programmatically, using the same mechanism as for existing PacketCapture
tests.

Finally, we add a new e2e test case for the PacketCapture feature, to
test the case where an unexpected public host key is provided in the
PacketCapture CR (the key does not match any of the server's keys).

Note that as part of this change, the toolbox image is updated to 1.5-0,
as the curl command included with ubuntu 22.04 seems to have issues with
SFTP (the 1.5 version of the image is based on ubuntu 24.04).

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas requested review from hangyan and tnqn December 13, 2024 23:22
@antoninbas antoninbas added the area/test/e2e Issues or PRs related to Antrea specific end-to-end testing. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test/e2e Issues or PRs related to Antrea specific end-to-end testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant