Skip to content

Commit

Permalink
workflows: check status of Relay port-forward
Browse files Browse the repository at this point in the history
Since we start a background process for port-forwarding Relay, we must
check if it actually succeeded or failed before allowing workflows to
continue.

We also standardize a 10s allowance time for port-forward to start.

Signed-off-by: Nicolas Busseneau <[email protected]>
  • Loading branch information
nbusseneau committed Jul 2, 2021
1 parent 8d0139b commit e56619b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/in-cluster-test-scripts/eks-tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cilium status --wait
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]

# Run connectivity test
cilium connectivity test --all-flows
Expand Down
1 change: 1 addition & 0 deletions .github/in-cluster-test-scripts/eks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cilium status --wait
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]

# Run connectivity test
cilium connectivity test --all-flows
Expand Down
1 change: 1 addition & 0 deletions .github/in-cluster-test-scripts/gke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cilium status --wait
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]

# Run connectivity test
cilium connectivity test --all-flows
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ jobs:
- name: Port forward Relay
run: |
cilium hubble port-forward&
sleep 5s
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Run connectivity test
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
- name: Relay Port Forward
run: |
cilium hubble port-forward&
sleep 5s
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Connectivity Test
run: |
Expand All @@ -87,7 +88,8 @@ jobs:
pkill -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay"
sleep 1s
cilium hubble port-forward&
sleep 5s
sleep 10s
[[ $(pgrep -f "cilium hubble port-forward|kubectl port-forward.*hubble-relay" | wc -l) == 2 ]]
- name: Connectivity test
run: |
Expand Down

0 comments on commit e56619b

Please sign in to comment.