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

Commits on May 31, 2023

  1. Test CNI ordering

    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 committed May 31, 2023
    Configuration menu
    Copy the full SHA
    b446c6f View commit details
    Browse the repository at this point in the history