-
Notifications
You must be signed in to change notification settings - Fork 193
64 lines (59 loc) · 1.87 KB
/
minikube-e2e-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: minikube-e2e-docker
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.22.0'
kubernetes version: 'v1.21.2'
start args: --wait=all
# github token: ${{ secrets.GITHUB_TOKEN }} Uncomment if we have API limit issues
- name: Deploy test pod
run: |
kubectl create -f .github/workflows/assets/busybox-pod.yaml
kubectl wait --for=condition=Ready pod/busybox-sleep
- name: Build
run: |
make
- name: Run ksniff privileged
run: |
sleep 60 && pkill kubectl-sniff &
set +e
./kubectl-sniff busybox-sleep --privileged --namespace default --output-file /tmp/output.pcap
set -e
if [ ! -f /tmp/output.pcap ]; then
echo "PCAP not created"
exit 1
fi
- if: failure()
name: Check pod and events
run: |
kubectl get pods
kubectl get events
- name: Build static-tcpdmp
run: |
sudo apt-get install libpcap-dev
make static-tcpdump
make install
- name: Run ksniff with static tcpdump
run: |
sleep 60 && pkill kubectl-sniff &
set +e
./kubectl-sniff busybox-sleep --namespace default --output-file /tmp/output.pcap
set -e
if [ ! -f /tmp/output.pcap ]; then
echo "PCAP not created"
exit 1
fi