diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff6080cde..e3c8f28f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,7 +69,7 @@ jobs: - run: make bin - name: Test env: - KUBERNETES_VERSION: v1.29.2 + KUBERNETES_VERSION: v1.20.7 GH_TOKEN: ${{ secrets.CHECKRUNS_TOKEN }} run: ./test/e2e.sh fixtures/${{matrix.suite.name}} - name: Publish Unit Test Results diff --git a/checks/kubernetes_resource.go b/checks/kubernetes_resource.go index 42f63de9f..f2807a5ab 100644 --- a/checks/kubernetes_resource.go +++ b/checks/kubernetes_resource.go @@ -325,7 +325,14 @@ func DeleteResources(ctx *context.Context, check v1.KubernetesResourceCheck, del } switch resource.GetKind() { - case "Namespace": // namespace cannot be deleted with `.DeleteCollection()` + case "Namespace", "Service": + // NOTE: namespace cannot be deleted with `.DeleteCollection()` + // + // Even though Service can be deleted with `.DeleteCollection()` + // it failed on the CI. It's probably due to an older kubernetes + // version we're using on the CI (v1.20.7). + // Delete it by name for now while we wait upgrade the kubernetes version + // on our CI. if err := rc.Delete(ctx, resource.GetName(), deleteOpt); err != nil { var statusErr *apiErrors.StatusError if errors.As(err, &statusErr) { diff --git a/test/karina.yaml b/test/karina.yaml index a497c3706..f56195466 100644 --- a/test/karina.yaml +++ b/test/karina.yaml @@ -12,7 +12,7 @@ ingressCA: privateKey: ../.certs/ingress-ca.key password: foobar kubernetes: - version: v1.29.2 + version: v1.20.7 kubeletExtraArgs: node-labels: "ingress-ready=true" authorization-mode: "AlwaysAllow"