Skip to content

Commit b5a0a58

Browse files
connectivity: Label test namespaces
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]>
1 parent 7434a27 commit b5a0a58

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

.github/workflows/aks-byocni.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ jobs:
150150
151151
# Run connectivity test
152152
cilium connectivity test --test-concurrency=5 --collect-sysdump-on-failure --external-target bing.com.
153+
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
153154
154155
# Run performance test
155156
cilium connectivity perf --duration 1s

.github/workflows/eks-tunnel.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ jobs:
168168
# - https://github.com/cilium/cilium/issues/16975 is fixed
169169
# - fix has been deployed to a stable branch
170170
# - cilium-cli default cilium version has been updated to pick up the fix
171+
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
171172
172173
# Run performance test
173174
cilium connectivity perf --duration 1s

.github/workflows/eks.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ jobs:
161161
162162
# Run connectivity test
163163
cilium connectivity test --test-concurrency=3 --all-flows --collect-sysdump-on-failure --external-target amazon.com.
164+
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
164165
165166
# Run performance test
166167
cilium connectivity perf --duration 1s

.github/workflows/externalworkloads.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ jobs:
215215
run: |
216216
# Run connectivity test
217217
cilium connectivity test --test-concurrency=5 --all-flows --collect-sysdump-on-failure --external-target google.com.
218+
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
218219
219220
# Run performance test
220221
cilium connectivity perf --duration 1s

.github/workflows/gke.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ jobs:
156156
157157
# Run connectivity test
158158
cilium connectivity test --test-concurrency=5 --all-flows --collect-sysdump-on-failure --external-target google.com.
159+
kubectl delete namespace -l "app.kubernetes.io/name=cilium-cli"
159160
160161
# Run performance test
161162
cilium connectivity perf --duration 1s

connectivity/check/deployment.go

+7
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ const (
6767
KindTestConnDisrupt = "test-conn-disrupt"
6868
)
6969

70+
var (
71+
appLabels = map[string]string{
72+
"app.kubernetes.io/name": "cilium-cli",
73+
}
74+
)
75+
7076
type deploymentParameters struct {
7177
Name string
7278
Kind string
@@ -409,6 +415,7 @@ func (ct *ConnectivityTest) deploy(ctx context.Context) error {
409415
ObjectMeta: metav1.ObjectMeta{
410416
Name: ct.params.TestNamespace,
411417
Annotations: ct.params.NamespaceAnnotations,
418+
Labels: appLabels,
412419
},
413420
}
414421
_, err = client.CreateNamespace(ctx, namespace, metav1.CreateOptions{})

0 commit comments

Comments
 (0)