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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test CNI ordering #248

Merged
merged 1 commit into from
Jun 1, 2023
Merged

Test CNI ordering #248

merged 1 commit into from
Jun 1, 2023

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented May 24, 2023

Followup to #242

This adds a new integration test that verifies that pods don't get scheduled until all the networking has been setup, making sure having linkerd-cni run run first doesn't trigger scheduling.

Note that for now we just consider the linkerd-cni+calico combo.

Worklow:

  1. Install calico and linkerd-cni.
  2. Label node and then add node selectors to calico and linkerd-cni to run only on the current node.
  3. Create a new node. Calico nor linkerd-cni will be triggered in it.
  4. Persist an nginx pod in that node. Verify it doesn't get scheduled.
  5. Add label to linkerd-cni to have it trigger in the new node.
  6. Verify the nginx pod still isn't scheduled.
  7. Add label to calico to have it trigger in the new node.
  8. Verify the nginx pod is finally scheduled.

Note that currently the test fails at step 6, but will pass as soon #242 gets merged.

Update: now that #242 has been merged, the tests are green 馃憤

@alpeb alpeb requested a review from a team as a code owner May 24, 2023 10:21
@alpeb alpeb force-pushed the alpeb/cni-plugin-test-node-scale branch from cd75f0a to a4ca193 Compare May 24, 2023 10:27
@alpeb alpeb force-pushed the alpeb/cni-plugin-test-node-scale branch 2 times, most recently from 9d9395a to 92b6d0a Compare May 31, 2023 21:03
Followup to #242

This adds a new integration test that verifies that pods don't get
scheduled until all the networking has been setup, making sure having
linkerd-cni run run first doesn't trigger scheduling.

Note that for now we just consider the linkerd-cni+calico combo.

Worklow:

1. Install calico and linkerd-cni.
2. Label node and then add node selectors to calico and linkerd-cni to run only on the current node.
3. Create a new node. Calico nor linkerd-cni will be triggered in it.
4. Persist an nginx pod in that node. Verify it doesn't get scheduled.
5. Add label to linkerd-cni to have it trigger in the new node.
6. Verify the nginx pod still isn't scheduled.
7. Add label to calico to have it trigger in the new node.
8. Verify the nginx pod is finally scheduled.

Note that currently the test fails at step 6, but will pass as soon #242
gets merged. In order to test succesfully, you can apply this patch:

```diff
diff --git a/cni-plugin/integration/manifests/calico/linkerd-cni.yaml b/cni-plugin/integration/manifests/calico/linkerd-cni.yaml
index 05f110b..419abdd 100644
--- a/cni-plugin/integration/manifests/calico/linkerd-cni.yaml
+++ b/cni-plugin/integration/manifests/calico/linkerd-cni.yaml
@@ -123,7 +123,7 @@ spec:
       # script copies the files into place and then sleeps so
       # that Kubernetes doesn't keep trying to restart it.
       - name: install-cni
-        image: test.l5d.io/linkerd/cni-plugin:test
+        image: ghcr.io/alpeb/cni-plugin:v1.2.8
         #image: cr.l5d.io/linkerd/cni-plugin:edge-22.12.1
         env:
         - name: DEST_CNI_NET_DIR
```
@alpeb alpeb force-pushed the alpeb/cni-plugin-test-node-scale branch from 92b6d0a to b446c6f Compare May 31, 2023 21:20
@alpeb alpeb requested a review from mateiidavid May 31, 2023 21:28
Copy link
Member

@mateiidavid mateiidavid left a comment

Choose a reason for hiding this comment

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

Looks great!

@alpeb alpeb merged commit 982b933 into main Jun 1, 2023
17 checks passed
@alpeb alpeb deleted the alpeb/cni-plugin-test-node-scale branch June 1, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants