From da3b97a2d2a2b666f6a0bc15a1c2b42277c0a2c3 Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Tue, 1 Aug 2023 13:43:09 +0300 Subject: [PATCH] Change k8s versions used in clusterctl tests for v1.4=>current upgrade tests Signed-off-by: Furkat Gofurov --- test/e2e/clusterctl_upgrade_test.go | 16 ++++++++-------- .../v1.5/bases/cluster-with-kcp.yaml | 14 ++++++++++++-- .../infrastructure-docker/v1.5/bases/md.yaml | 8 +++++++- .../v1.5/clusterclass-quick-start.yaml | 4 ++-- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 27376005737b..b36beaaa215d 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -87,9 +87,9 @@ var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, InitWithProvidersContract: "v1beta1", - // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.3/bases. - InitWithKubernetesVersion: "v1.26.4", - WorkloadKubernetesVersion: "v1.26.4", + // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/e2e/data/infrastructure-docker/v1.4/bases. + InitWithKubernetesVersion: "v1.27.1", + WorkloadKubernetesVersion: "v1.27.1", MgmtFlavor: "topology", WorkloadFlavor: "", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -128,9 +128,9 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>cur // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, InitWithProvidersContract: "v1beta1", - // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.3/bases. - InitWithKubernetesVersion: "v1.26.4", - WorkloadKubernetesVersion: "v1.26.4", + // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/e2e/data/infrastructure-docker/v1.4/bases. + InitWithKubernetesVersion: "v1.27.1", + WorkloadKubernetesVersion: "v1.27.1", MgmtFlavor: "topology", WorkloadFlavor: "topology", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -159,7 +159,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { InfrastructureProvider: pointer.String("docker"), InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1beta1", - // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.4/bases. + // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/e2e/data/infrastructure-docker/v1.5/bases. InitWithKubernetesVersion: "v1.27.3", WorkloadKubernetesVersion: "v1.27.3", MgmtFlavor: "topology", @@ -190,7 +190,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>cur InfrastructureProvider: pointer.String("docker"), InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1beta1", - // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.4/bases. + // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/e2e/data/infrastructure-docker/v1.5/bases. InitWithKubernetesVersion: "v1.27.3", WorkloadKubernetesVersion: "v1.27.3", MgmtFlavor: "topology", diff --git a/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml b/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml index 30079167200d..dd70590ab01e 100644 --- a/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml @@ -56,6 +56,8 @@ metadata: spec: template: spec: + # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. + customImage: "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock" @@ -85,7 +87,15 @@ spec: # host.docker.internal is required by kubetest when running on MacOS because of the way ports are proxied. certSANs: [localhost, 127.0.0.1, 0.0.0.0, host.docker.internal] initConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + nodeRegistration: + criSocket: unix:///var/run/containerd/containerd.sock + kubeletExtraArgs: + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + fail-swap-on: "false" joinConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + nodeRegistration: + criSocket: unix:///var/run/containerd/containerd.sock + kubeletExtraArgs: + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + fail-swap-on: "false" version: "${KUBERNETES_VERSION}" diff --git a/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml b/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml index 5d42a2cf5e6a..261617eb1081 100644 --- a/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml @@ -8,6 +8,8 @@ metadata: spec: template: spec: + # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. + customImage: "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock" @@ -23,7 +25,11 @@ spec: template: spec: joinConfiguration: - nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + nodeRegistration: + criSocket: unix:///var/run/containerd/containerd.sock + kubeletExtraArgs: + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + fail-swap-on: "false" --- # MachineDeployment object apiVersion: cluster.x-k8s.io/v1beta1 diff --git a/test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml b/test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml index 5a0c22c59b32..35052a419205 100644 --- a/test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml +++ b/test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml @@ -374,7 +374,7 @@ spec: InfraMachineTemplate.controlPlane.template.annotation: "InfraMachineTemplate.controlPlane.template.annotationValue" spec: # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b" + customImage: "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock" @@ -396,7 +396,7 @@ spec: InfraMachineTemplate.machineDeployment.template.annotation: "InfraMachineTemplate.machineDeployment.template.annotationValue" spec: # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here. - customImage: "kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b" + customImage: "kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock"