Skip to content

Commit 17531e8

Browse files
committed
ci(.github): add installer pod status check to helm smoke test
Signed-off-by: Vaughn Dice <[email protected]>
1 parent 872704f commit 17531e8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

.github/workflows/helm-chart-smoketest.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,11 @@ jobs:
158158
- name: label nodes
159159
run: kubectl label node --all spin=true
160160

161-
# MicroK8s runs directly on the host, so both the host's containerd process and MicroK8s' would
162-
# otherwise be detected by runtime-class-manager. As of writing, rcm will fail if more than one
163-
# containerd process is detected when attempting to restart. So, we stop the host process until
164-
# the shim has been installed and the test app has been confirmed to run.
165-
- name: stop system containerd
166-
if: matrix.config.type == 'microk8s'
167-
run: sudo systemctl stop containerd
161+
- name: verify only one installer pod with Succeeded status
162+
# TODO: provisioning on k3d still leads to the first installer pod finishing with provisioner status Unknown and phase Failed
163+
if: matrix.config.type != 'k3d'
164+
run: |
165+
timeout 60s bash -c 'until [[ "$(kubectl -n rcm get $(kubectl get pods -n rcm --no-headers -o name | grep install | head -n1) -o jsonpath="{.status.phase}" 2>/dev/null)" == "Succeeded" ]]; do sleep 2; done'
168166
169167
- name: run Spin App
170168
run: |
@@ -186,7 +184,7 @@ jobs:
186184
kubectl describe runtimeclass wasmtime-spin-v2
187185
188186
# Get install pod logs
189-
# Note: there may be multiple pods pending fix in https://github.com/spinkube/runtime-class-manager/issues/140
187+
# Note: there may be multiple pods pending k3d fix for issue https://github.com/spinkube/runtime-class-manager/issues/140
190188
install_pod=$(kubectl get pods -n rcm --no-headers -o name | awk '{if ($1 ~ "-spin-v2-install") print $0}' | tail -n 1)
191189
kubectl describe -n rcm $install_pod || true
192190
kubectl logs -n rcm -c downloader $install_pod || true

internal/containerd/restart_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func Test_getPid(t *testing.T) {
5757
for _, tt := range tests {
5858
t.Run(tt.name, func(t *testing.T) {
5959
psProcesses = tt.psProccessesMock
60-
got, err := getPid()
60+
got, err := getPid("containerd")
6161

6262
if tt.wantErr {
6363
require.Error(t, err)

0 commit comments

Comments
 (0)