File tree Expand file tree Collapse file tree 4 files changed +7
-43
lines changed Expand file tree Collapse file tree 4 files changed +7
-43
lines changed Original file line number Diff line number Diff line change 11.PHONY : test
22
3- build_and_push :
4- docker build -t sysdig/capture-and-sleep docker/
5- docker push sysdig/capture-and-sleep
6-
73test :
84 bats test/* .bats
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -75,7 +75,11 @@ metadata:
7575spec:
7676 containers:
7777 - name: capturer
78- image: sysdig/capture-and-sleep
78+ image: sysdig/sysdig
79+ args:
80+ - /bin/bash
81+ - "-c"
82+ - "echo '* Capturing system calls'; sysdig -S -M ${duration} -pk -z -w /${capture_pod} .scap.gz; touch /.finished; trap 'exit 0' TERM; sleep infinity & wait $! "
7983 imagePullPolicy: IfNotPresent
8084 securityContext:
8185 privileged: true
8690 limits:
8791 cpu: 100m
8892 memory: 128Mi
89- env:
90- - name: CAPTURE_DURATION
91- value: "${duration} "
92- - name: CAPTURE_FILE_NAME
93- value: ${capture_pod}
9493 volumeMounts:
9594 - mountPath: /host/var/run/docker.sock
9695 name: docker-socket
@@ -147,12 +146,12 @@ EOF
147146
148147 sleep ${duration}
149148 while [[ ! -e .finished ]]; do
150- kubectl cp ${capture_pod} :/captures/ .finished .finished > /dev/null 2>&1
149+ kubectl cp ${capture_pod} :/.finished .finished > /dev/null 2>&1
151150 sleep 20
152151 done
153152 rm .finished
154153
155- kubectl cp ${capture_pod} :/captures/ ${capture_pod} .scap.gz ${capture_pod} .scap.gz > /dev/null 2>&1
154+ kubectl cp ${capture_pod} :/${capture_pod} .scap.gz ${capture_pod} .scap.gz > /dev/null 2>&1
156155 kubectl delete pod ${capture_pod} > /dev/null 2>&1
157156 echo " Your capture is now available at ${capture_pod} .scap.gz"
158157}
You can’t perform that action at this time.
0 commit comments