Skip to content

Commit

Permalink
connectivity: Label test namespaces
Browse files Browse the repository at this point in the history
Sometimes the perf command fails to schedule pods because there are too
many pods [^1]. Add app.kubernetes.io/name label [^2] to connectivity
test namespaces, and use the label to delete test namespaces before
running the perf command.

[^1]: https://github.com/cilium/cilium-cli/actions/runs/9730132031/job/26852838732
[^2]: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent committed Jun 30, 2024
1 parent 7434a27 commit 56827f2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/aks-byocni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
# Run connectivity test
cilium connectivity test --test-concurrency=5 --collect-sysdump-on-failure --external-target bing.com.
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
# Run performance test
cilium connectivity perf --duration 1s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/eks-tunnel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ jobs:
# - https://github.com/cilium/cilium/issues/16975 is fixed
# - fix has been deployed to a stable branch
# - cilium-cli default cilium version has been updated to pick up the fix
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
# Run performance test
cilium connectivity perf --duration 1s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ jobs:
# Run connectivity test
cilium connectivity test --test-concurrency=3 --all-flows --collect-sysdump-on-failure --external-target amazon.com.
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
# Run performance test
cilium connectivity perf --duration 1s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/externalworkloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ jobs:
run: |
# Run connectivity test
cilium connectivity test --test-concurrency=5 --all-flows --collect-sysdump-on-failure --external-target google.com.
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
# Run performance test
cilium connectivity perf --duration 1s
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
# Run connectivity test
cilium connectivity test --test-concurrency=5 --all-flows --collect-sysdump-on-failure --external-target google.com.
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
# Run performance test
cilium connectivity perf --duration 1s
Expand Down
7 changes: 7 additions & 0 deletions connectivity/check/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ const (
KindTestConnDisrupt = "test-conn-disrupt"
)

var (
appLabels = map[string]string{
"app.kubernetes.io/name": "cilium-cli",
}
)

type deploymentParameters struct {
Name string
Kind string
Expand Down Expand Up @@ -409,6 +415,7 @@ func (ct *ConnectivityTest) deploy(ctx context.Context) error {
ObjectMeta: metav1.ObjectMeta{
Name: ct.params.TestNamespace,
Annotations: ct.params.NamespaceAnnotations,
Labels: appLabels,
},
}
_, err = client.CreateNamespace(ctx, namespace, metav1.CreateOptions{})
Expand Down

0 comments on commit 56827f2

Please sign in to comment.