Skip to content

ci: mtu check for cilium e2e #3624

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

ci: mtu check for cilium e2e #3624

wants to merge 9 commits into from

Conversation

camrynl
Copy link
Contributor

@camrynl camrynl commented May 2, 2025

Reason for Change:
compare pod eth0 mtu with node eth0 mtu and verify same value

Issue Fixed:

Requirements:

Notes:

@camrynl camrynl added the ci Infra or tooling. label May 2, 2025
@Copilot Copilot AI review requested due to automatic review settings May 2, 2025 23:24
@camrynl camrynl requested a review from a team as a code owner May 2, 2025 23:24
@camrynl camrynl requested a review from karina-ranadive May 2, 2025 23:24
@camrynl
Copy link
Contributor Author

camrynl commented May 2, 2025

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an MTU check for Cilium e2e tests by deploying an nginx application and executing a validation script to compare pod and node MTU values.

  • Adds a new nginx deployment manifest for Kubernetes
  • Integrates MTU validation steps into multiple pipeline YAML templates
  • Executes the cilium-mtu-validation.sh script via newly added CI steps

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
hack/manifests/nginx.yaml New nginx deployment manifest for MTU testing deployed in kube-system
.pipelines/templates/cilium-tests.yaml Added CI step to deploy nginx and run MTU validation
.pipelines/singletenancy/cilium/cilium-e2e.steps.yaml Added CI step with workingDirectory for MTU validation
.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e.steps.yaml Added CI step with workingDirectory for MTU validation
.pipelines/singletenancy/cilium-overlay/cilium-overlay-e2e-step-template.yaml Added CI step for MTU validation
.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e.steps.yaml Added CI step with workingDirectory for MTU validation
.pipelines/singletenancy/cilium-overlay-withhubble/cilium-overlay-e2e-step-template.yaml Added CI step for MTU validation
.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e.steps.yaml Added CI step with workingDirectory for MTU validation
.pipelines/singletenancy/cilium-dualstack-overlay/cilium-dualstackoverlay-e2e-step-template.yaml Added CI step for MTU validation
.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml Extended load test with MTU validation steps
Files not reviewed (1)
  • hack/scripts/cilium-mtu-validation.sh: Language not supported

Copy link
Contributor

@jpayne3506 jpayne3506 left a comment

Choose a reason for hiding this comment

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

Can we change this to a template and also have the template call within cilium-tests.yaml?

Comment on lines 4 to 5
kubectl apply -f hack/manifests/nginx.yaml
kubectl wait --for=condition=available --timeout=60s -n kube-system deployment/nginx
Copy link
Contributor

Choose a reason for hiding this comment

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

we are doing this in the script as well right ? We can remove tis from here in that case.

# in CNI release test scenario scale deployments to 3 * node count to get replicas on each node
if [ "$node_count" -gt 1 ]; then
echo "Scaling nginx deployment to $((3 * node_count)) replicas"
kubectl scale deployment nginx --replicas=$((2 * node_count)) -n kube-system
Copy link
Contributor

Choose a reason for hiding this comment

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

So it says scaing to 3*node_count but does only to 2*node_count ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah will update this, meant to be 3

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this be easier to just set this on line 8 and just call $(node_count)?

# in CNI release test scenario scale deployments to 3 * node count to get replicas on each node
if [ "$node_count" -gt 1 ]; then
echo "Scaling nginx deployment to $((3 * node_count)) replicas"
kubectl scale deployment nginx --replicas=$((2 * node_count)) -n kube-system
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this be easier to just set this on line 8 and just call $(node_count)?

Copy link
Contributor

@jpayne3506 jpayne3506 left a comment

Choose a reason for hiding this comment

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

2 last template call misses and 🚀

jpayne3506
jpayne3506 previously approved these changes May 15, 2025
echo "Nginx pod eth0 MTU: $nginx_mtu"

# Get the node's eth0 MTU
node_mtu=$(kubectl debug node/$node -it --image=busybox -- sh -c "cat /sys/class/net/eth0/mtu" 2>/dev/null | tail -n 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason why we need to tail this and not the other one ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there's some extra output from creating the debug pod that needs to be filtered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Infra or tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants