Skip to content

Commit

Permalink
connectivity: use random namespace in ci
Browse files Browse the repository at this point in the history
Helps making sure there isn't a regression on the '--test-namespace'
issue.

Signed-off-by: Bruno Miguel Custódio <[email protected]>
  • Loading branch information
bmcustodio committed Jun 17, 2021
1 parent 5e6a31b commit bbf8f4a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/in-cluster-test-scripts/eks-tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ cilium hubble port-forward&
sleep 10s

# Run connectivity test
cilium connectivity test --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --all-flows

# Retrieve Cilium status
cilium status
3 changes: 2 additions & 1 deletion .github/in-cluster-test-scripts/eks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ cilium hubble port-forward&
sleep 10s

# Run connectivity test
cilium connectivity test --test '!/pod-to-local-nodeport' --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --test '!/pod-to-local-nodeport' --all-flows

# Retrieve Cilium status
cilium status
3 changes: 2 additions & 1 deletion .github/in-cluster-test-scripts/external-workloads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -x
set -e

# Run connectivity test
cilium connectivity test --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --all-flows

# Retrieve Cilium status
cilium status
Expand Down
3 changes: 2 additions & 1 deletion .github/in-cluster-test-scripts/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ cilium hubble port-forward&
sleep 10s

# Run connectivity test
cilium connectivity test --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --all-flows

# Retrieve Cilium status
cilium status
3 changes: 2 additions & 1 deletion .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ jobs:
- name: Run connectivity test
run: |
cilium connectivity test --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --all-flows

- name: Post-test information gathering
if: ${{ failure() }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
- name: Connectivity Test
run: |
cilium connectivity test --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --all-flows

- name: Uninstall cilium
run: |
Expand All @@ -89,7 +90,8 @@ jobs:
- name: Connectivity test
run: |
cilium connectivity test --force-deploy --all-flows
TEST_NAMESPACE="cilium-test-$(base64 /dev/urandom | tr -d '/+' | dd bs=6 count=1 2>/dev/null)"
cilium connectivity test --test-namespace "${TEST_NAMESPACE}" --force-deploy --all-flows

- name: Cleanup
if: ${{ always() }}
Expand Down

0 comments on commit bbf8f4a

Please sign in to comment.