Add e2e test for SupportBundleCollection for K8s Nodes #6866
+754
−420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).