File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,7 @@ jobs:
296
296
- archlinux.yaml
297
297
- opensuse.yaml
298
298
- docker.yaml
299
+ - k8s.yaml
299
300
- ../hack/test-templates/alpine-iso-9p-writable.yaml # Covers alpine-iso.yaml
300
301
- ../hack/test-templates/net-user-v2.yaml
301
302
- ../hack/test-templates/test-misc.yaml # TODO: merge net-user-v2 into test-misc
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ declare -A CHECKS=(
45
45
[" systemd-strict" ]=" 1"
46
46
[" mount-home" ]=" 1"
47
47
[" container-engine" ]=" 1"
48
+ [" k8s" ]=" "
48
49
[" restart" ]=" 1"
49
50
# snapshot tests are too flaky (especially with archlinux)
50
51
[" snapshot-online" ]=" "
@@ -64,6 +65,12 @@ declare -A CHECKS=(
64
65
[" ssh-over-vsock" ]=" "
65
66
)
66
67
68
+ clear_checks () {
69
+ for k in " ${! CHECKS[@]} " ; do
70
+ CHECKS[" $k " ]=" "
71
+ done
72
+ }
73
+
67
74
case " $NAME " in
68
75
" default" )
69
76
# CI failure:
@@ -77,9 +84,10 @@ case "$NAME" in
77
84
CHECKS[" container-engine" ]=
78
85
[ " $NAME " = " alpine-iso-9p-writable" ] && CHECKS[" mount-path-with-spaces" ]=" 1"
79
86
;;
80
- " k3s" )
81
- ERROR " File \" $FILE \" is not testable with this script"
82
- exit 1
87
+ " k0s" | " k3s" | " k8s" )
88
+ # Disable all checks except k8s
89
+ clear_checks
90
+ CHECKS[" k8s" ]=" 1"
83
91
;;
84
92
" fedora" )
85
93
WARNING " Relaxing systemd tests for fedora (For avoiding CI failure)"
@@ -432,6 +440,18 @@ if [[ -n ${CHECKS["container-engine"]} ]]; then
432
440
fi
433
441
fi
434
442
443
+ if [[ -n ${CHECKS["k8s"]} ]]; then
444
+ INFO " Testing Kubernetes"
445
+ set -x
446
+ limactl shell " $NAME " kubectl get nodes -o wide
447
+ limactl shell " $NAME " kubectl create deployment nginx --image=" ${nginx_image} "
448
+ limactl shell " $NAME " kubectl create service nodeport nginx --node-port=31080 --tcp=80:80
449
+ timeout 3m bash -euxc " until curl -f --retry 30 --retry-connrefused http://127.0.0.1:31080; do sleep 3; done"
450
+ limactl shell " $NAME " kubectl delete service nginx
451
+ limactl shell " $NAME " kubectl delete deployment nginx
452
+ set +x
453
+ fi
454
+
435
455
if [[ -n ${CHECKS["port-forwards"]} ]]; then
436
456
INFO " Testing port forwarding rules using netcat"
437
457
set -x
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ Container orchestration:
57
57
- [ ` faasd ` ] ( ./faasd.yaml ) : [ Faasd] ( https://docs.openfaas.com/deployment/edge/ )
58
58
- [ ` k0s ` ] ( ./k0s.yaml ) : [ k0s] ( https://k0sproject.io/ ) Zero Friction Kubernetes
59
59
- [ ` k3s ` ] ( ./k3s.yaml ) : Kubernetes via k3s
60
- - [ ` k8s ` ] ( ./k8s.yaml ) : Kubernetes via kubeadm
60
+ - [ ` k8s ` ] ( ./k8s.yaml ) : ⭐ Kubernetes via kubeadm
61
61
- [ ` experimental/u7s ` ] ( ./experimental/u7s.yaml ) : [ Usernetes] ( https://github.com/rootless-containers/usernetes ) : Rootless Kubernetes
62
62
63
63
Optional feature enablers:
You can’t perform that action at this time.
0 commit comments