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

connectivity: allow to restrict connectivity test pods using nodeSelector #1446

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Mar 9, 2023

The connectivity test pods will be restricted to nodes matching labels given in the --node-selector flag.

Usage:

$ kubectl get nodes
NAME                 STATUS   ROLES           AGE   VERSION
kind-control-plane   Ready    control-plane   15m   v1.25.3
kind-worker          Ready    <none>          15m   v1.25.3
kind-worker2         Ready    <none>          15m   v1.25.3
kind-worker3         Ready    <none>          15m   v1.25.3
kind-worker4         Ready    <none>          15m   v1.25.3
$ kubectl label nodes kind-worker{2,3} connectivity.cilium.io/test=true
$ cilium connectivity test --node-selector connectivity.cilium.io/test=true
[...]
✅ All 32 tests (261 actions) successful, 2 tests skipped, 1 scenarios skipped.
$ kubectl get pods -n cilium-test -o wide
NAME                              READY   STATUS    RESTARTS   AGE     IP             NODE           NOMINATED NODE   READINESS GATES
client-7858556799-xd52x           1/1     Running   0          5m56s   10.244.2.120   kind-worker3   <none>           <none>
client2-646989676f-zgxxl          1/1     Running   0          5m56s   10.244.2.55    kind-worker3   <none>           <none>
echo-other-node-79659b5c6-8dzfw   2/2     Running   0          5m55s   10.244.3.148   kind-worker2   <none>           <none>
echo-same-node-69f7699d84-5bvxj   2/2     Running   0          5m56s   10.244.2.168   kind-worker3   <none>           <none>

Fixes #1269

…ctor

The connectivity test pods will be restricted to nodes matching labels
given in the --node-selector flag.

Usage:

    $ kubectl get nodes
    NAME                 STATUS   ROLES           AGE   VERSION
    kind-control-plane   Ready    control-plane   15m   v1.25.3
    kind-worker          Ready    <none>          15m   v1.25.3
    kind-worker2         Ready    <none>          15m   v1.25.3
    kind-worker3         Ready    <none>          15m   v1.25.3
    kind-worker4         Ready    <none>          15m   v1.25.3
    $ kubectl label nodes kind-worker{2,3} connectivity.cilium.io/test=true
    $ cilium connectivity test --node-selector connectivity.cilium.io/test=true
    [...]
    ✅ All 32 tests (261 actions) successful, 2 tests skipped, 1 scenarios skipped.
    $ kubectl get pods -n cilium-test -o wide
    NAME                              READY   STATUS    RESTARTS   AGE     IP             NODE           NOMINATED NODE   READINESS GATES
    client-7858556799-xd52x           1/1     Running   0          5m56s   10.244.2.120   kind-worker3   <none>           <none>
    client2-646989676f-zgxxl          1/1     Running   0          5m56s   10.244.2.55    kind-worker3   <none>           <none>
    echo-other-node-79659b5c6-8dzfw   2/2     Running   0          5m55s   10.244.3.148   kind-worker2   <none>           <none>
    echo-same-node-69f7699d84-5bvxj   2/2     Running   0          5m56s   10.244.2.168   kind-worker3   <none>           <none>

Fixes #1269

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser requested a review from aanm March 9, 2023 16:27
@tklauser tklauser requested a review from a team as a code owner March 9, 2023 16:27
@tklauser tklauser requested a review from rolinh March 9, 2023 16:27
@tklauser tklauser temporarily deployed to ci March 9, 2023 16:27 — with GitHub Actions Inactive
Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

@squeed FYI

@tklauser tklauser merged commit 58995cd into master Mar 14, 2023
@tklauser tklauser deleted the pr/tklauser/connectivity-test-nodeselector branch March 14, 2023 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run connectivity tests based on nodeSelector
2 participants