test: add integration test for system extensions

This verifies system extensions via the gVisor system extension.

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
Andrey Smirnov
2022-01-26 23:26:34 +03:00
parent 7b39627456
commit 0bf161dffb
4 changed files with 34 additions and 3 deletions

View File

@@ -125,6 +125,10 @@ case "${TEST_MODE:-default}" in
get_kubeconfig
run_talos_integration_test
run_kubernetes_integration_test
if [ "${WITH_TEST:-none}" != "none" ]; then
"${WITH_TEST}"
fi
;;
esac

View File

@@ -211,3 +211,9 @@ function build_registry_mirrors {
REGISTRY_MIRROR_FLAGS=${REGISTRY_MIRROR_FLAGS:-}
fi
}
function run_gvisor_test {
${KUBECTL} apply -f ${PWD}/hack/test/gvisor/manifest.yaml
sleep 10
${KUBECTL} wait --for=condition=ready pod nginx-gvisor --timeout=1m
}

View File

@@ -0,0 +1,15 @@
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
name: gvisor
handler: runsc
---
apiVersion: v1
kind: Pod
metadata:
name: nginx-gvisor
spec:
runtimeClassName: gvisor
containers:
- name: nginx
image: nginx