From b8e4f0b6f25089c73c840157cba4ea6a09b624ed Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Wed, 24 Jul 2024 15:06:01 +0900 Subject: [PATCH] k8s: add alpine runu runtime test Signed-off-by: Hajime Tazaki --- k8s/alpine-runu.yaml | 23 +++++++++++++++++++++++ test/k8s-test.sh | 15 +++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 k8s/alpine-runu.yaml diff --git a/k8s/alpine-runu.yaml b/k8s/alpine-runu.yaml new file mode 100644 index 0000000..713d87f --- /dev/null +++ b/k8s/alpine-runu.yaml @@ -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: ["ping", "-c", "50", "8.8.8.8"] + env: + - name: RUMP_VERBOSE + value: "1" diff --git a/test/k8s-test.sh b/test/k8s-test.sh index eab0f57..5217579 100644 --- a/test/k8s-test.sh +++ b/test/k8s-test.sh @@ -33,3 +33,18 @@ 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 30 +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.4 ""