From ea99f780094dc9af0aac0e8f30d88146dd6cf104 Mon Sep 17 00:00:00 2001 From: Jussi Nummelin Date: Wed, 4 Oct 2023 14:22:27 +0300 Subject: [PATCH 1/3] Ensure compatible versions are used between CP and workers Signed-off-by: Jussi Nummelin --- .../capi_controlplane_docker_downscaling_test.go | 1 + .../capi_controlplane_docker_tunneling_proxy_test.go | 4 +++- .../capi_controlplane_docker_tunneling_test.go | 1 + .../capi_controlplane_docker_worker_test.go | 1 + .../capi-controlplane-docker/capi_controlplane_docker_test.go | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inttest/capi-controlplane-docker-downscaling/capi_controlplane_docker_downscaling_test.go b/inttest/capi-controlplane-docker-downscaling/capi_controlplane_docker_downscaling_test.go index 88188dce8..8def58e36 100644 --- a/inttest/capi-controlplane-docker-downscaling/capi_controlplane_docker_downscaling_test.go +++ b/inttest/capi-controlplane-docker-downscaling/capi_controlplane_docker_downscaling_test.go @@ -249,6 +249,7 @@ metadata: spec: replicas: 3 k0sConfigSpec: + version: v1.27.1+k0s.0 k0s: apiVersion: k0s.k0sproject.io/v1beta1 kind: ClusterConfig diff --git a/inttest/capi-controlplane-docker-tunneling-proxy/capi_controlplane_docker_tunneling_proxy_test.go b/inttest/capi-controlplane-docker-tunneling-proxy/capi_controlplane_docker_tunneling_proxy_test.go index af6dde2e6..5e5b870f3 100644 --- a/inttest/capi-controlplane-docker-tunneling-proxy/capi_controlplane_docker_tunneling_proxy_test.go +++ b/inttest/capi-controlplane-docker-tunneling-proxy/capi_controlplane_docker_tunneling_proxy_test.go @@ -19,7 +19,6 @@ package capicontolplanedockertunneling import ( "context" "fmt" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "net/http" "net/url" "os" @@ -29,6 +28,8 @@ import ( "testing" "time" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k0stestutil "github.com/k0sproject/k0s/inttest/common" "github.com/k0sproject/k0smotron/inttest/util" @@ -245,6 +246,7 @@ metadata: spec: replicas: 1 k0sConfigSpec: + version: v1.27.1+k0s.0 tunneling: enabled: true mode: proxy diff --git a/inttest/capi-controlplane-docker-tunneling/capi_controlplane_docker_tunneling_test.go b/inttest/capi-controlplane-docker-tunneling/capi_controlplane_docker_tunneling_test.go index 709374a64..ea3f2afb8 100644 --- a/inttest/capi-controlplane-docker-tunneling/capi_controlplane_docker_tunneling_test.go +++ b/inttest/capi-controlplane-docker-tunneling/capi_controlplane_docker_tunneling_test.go @@ -238,6 +238,7 @@ metadata: spec: replicas: 1 k0sConfigSpec: + version: v1.27.1+k0s.0 tunneling: enabled: true k0s: diff --git a/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go b/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go index 9ce54c1fd..e8ce3c6e0 100644 --- a/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go +++ b/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go @@ -195,6 +195,7 @@ metadata: spec: replicas: 1 k0sConfigSpec: + version: v1.28.2+k0s.0 k0s: apiVersion: k0s.k0sproject.io/v1beta1 kind: ClusterConfig diff --git a/inttest/capi-controlplane-docker/capi_controlplane_docker_test.go b/inttest/capi-controlplane-docker/capi_controlplane_docker_test.go index 5dfddeda3..ce2847109 100644 --- a/inttest/capi-controlplane-docker/capi_controlplane_docker_test.go +++ b/inttest/capi-controlplane-docker/capi_controlplane_docker_test.go @@ -238,6 +238,7 @@ metadata: spec: replicas: 3 k0sConfigSpec: + version: v1.27.2+k0s.0 k0s: apiVersion: k0s.k0sproject.io/v1beta1 kind: ClusterConfig From 0aac0c41c36f761598f4cbee1c7fe2b3a0228fd6 Mon Sep 17 00:00:00 2001 From: Jussi Nummelin Date: Wed, 4 Oct 2023 15:25:05 +0300 Subject: [PATCH 2/3] Try out a bit beefier runner Signed-off-by: Jussi Nummelin --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0df9f2864..b44932f92 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -84,7 +84,7 @@ jobs: smoketest: name: Smoke test needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-22.04-8core strategy: fail-fast: false matrix: @@ -117,7 +117,7 @@ jobs: capi-smokes: name: Cluster API smoke tests needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-22.04-8core strategy: fail-fast: false matrix: From 3978ed70d3c66e311e5cbd9d81dedba6838990da Mon Sep 17 00:00:00 2001 From: Jussi Nummelin Date: Wed, 4 Oct 2023 17:12:45 +0300 Subject: [PATCH 3/3] Delete only the top-level cluster object, otherwise there's timing issues Signed-off-by: Jussi Nummelin --- .../capi_controlplane_docker_worker_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go b/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go index e8ce3c6e0..e8107486a 100644 --- a/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go +++ b/inttest/capi-controlplane-docker-worker/capi_controlplane_docker_worker_test.go @@ -136,7 +136,7 @@ func (s *CAPIControlPlaneDockerSuite) applyClusterObjects() { func (s *CAPIControlPlaneDockerSuite) deleteCluster() { // Exec via kubectl - out, err := exec.Command("kubectl", "delete", "-f", s.clusterYamlsPath).CombinedOutput() + out, err := exec.Command("kubectl", "delete", "cluster", "docker-test-cluster").CombinedOutput() s.Require().NoError(err, "failed to delete cluster objects: %s", string(out)) }