Skip to content

Commit

Permalink
k8s: add alpine runu runtime test
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Jul 24, 2024
1 parent dde3625 commit e8d215f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
23 changes: 23 additions & 0 deletions k8s/alpine-runu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: alpine-runu
spec:
selector:
matchLabels:
app: alpine-runu
replicas: 1
template:
metadata:
labels:
app: alpine-runu
spec:
runtimeClassName: ukontainer
containers:
- name: alpine-runu
image: alpine:latest
imagePullPolicy: Always
args: ["busybox", "ping", "-c", "50", "8.8.8.8"]
env:
- name: RUMP_VERBOSE
value: "1"
17 changes: 16 additions & 1 deletion test/k8s-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,26 @@ cat k8s/hello-world.yaml | sed "s/\$DOCKER_IMG_VERSION/$DOCKER_IMG_VERSION/" \
| kubectl apply -f -

kubectl get nodes -o wide -A
sleep 30
sleep 20
set -x
kubectl get pods -o wide -A
kubectl describe deployment/helloworld-runu
kubectl logs deployment/helloworld-runu |& tee /tmp/log.txt
grep "icmp_req=1" /tmp/log.txt

fold_end k8s.test.3 ""

fold_start k8s.test.4 "k8s: alpine hello world"
# install runu pod
cat k8s/alpine-runu.yaml | sed "s/8.8.8.8/$DST_ADDR/" \
| kubectl apply -f -

kubectl get nodes -o wide -A
sleep 20
set -x
kubectl get pods -o wide -A
kubectl describe deployment/alpine-runu
kubectl logs deployment/alpine-runu |& tee /tmp/log.txt
grep "seq=1" /tmp/log.txt

fold_end k8s.test.4 ""

0 comments on commit e8d215f

Please # to comment.