Skip to content

Commit

Permalink
.github: support native hubble port-forwarding
Browse files Browse the repository at this point in the history
Once 0.16.20 is merged, we can remove branching and support for the kubectl version.

Signed-off-by: devodev <[email protected]>
  • Loading branch information
devodev authored and michi-covalent committed Nov 5, 2024
1 parent 284d4b4 commit e61e610
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/eks-tunnel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,11 @@ jobs:
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
# Run connectivity test
cilium connectivity test --test-concurrency=3 --all-flows --collect-sysdump-on-failure --external-target amazon.com. \
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ jobs:
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
# Run connectivity test
cilium connectivity test --test-concurrency=3 --all-flows --collect-sysdump-on-failure --external-target amazon.com.
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ jobs:
# Port forward Relay
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
# Run connectivity test
cilium connectivity test --test-concurrency=5 --all-flows --collect-sysdump-on-failure --external-target google.com.
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
- name: Set up external targets
id: external_targets
Expand Down Expand Up @@ -160,7 +164,11 @@ jobs:
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
- name: Connectivity test
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,11 @@ jobs:
# Port forward Relay
cilium --context "${{ steps.contexts.outputs.cluster1 }}" hubble port-forward&
sleep 10s
[[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]
if ! [[ $(pgrep -f "kubectl.*port-forward.*hubble-relay" | wc -l) == 1 ]]; then
# support for native port-forwarding
# TODO: remove kubectl version after 0.16.20 release
[[ $(pgrep -f "cilium.*hubble.*port-forward" | wc -l) == 1 ]]
fi
# Run connectivity test
cilium --context "${{ steps.contexts.outputs.cluster1 }}" connectivity test --test-concurrency=5 \
Expand Down

0 comments on commit e61e610

Please sign in to comment.