From 9c8224b18f1b63d68fba3e9d897be04500aa3d0a Mon Sep 17 00:00:00 2001 From: Furkat Gofurov Date: Tue, 1 Aug 2023 11:55:05 +0300 Subject: [PATCH] Prepare main branch for v1.6 development Signed-off-by: Furkat Gofurov --- Makefile | 7 +- .../hack/create-local-repository.py | 12 +- docs/release/release-tasks.md | 2 +- hack/tools/tilt-prepare/main.go | 2 +- metadata.yaml | 3 + test/e2e/clusterctl_upgrade_test.go | 40 +- test/e2e/config/docker.yaml | 88 ++-- .../v1.5/bases/cluster-with-kcp.yaml | 91 ++++ .../v1.5/bases/cluster-with-topology.yaml | 59 +++ .../infrastructure-docker/v1.5/bases/crs.yaml | 24 + .../infrastructure-docker/v1.5/bases/md.yaml | 51 +++ .../kustomization.yaml | 3 + .../v1.5/cluster-template/kustomization.yaml | 5 + .../v1.5/clusterclass-quick-start.yaml | 427 ++++++++++++++++++ test/e2e/data/shared/main/metadata.yaml | 3 + .../data/shared/{v1.3 => v1.5}/metadata.yaml | 6 + 16 files changed, 750 insertions(+), 73 deletions(-) create mode 100644 test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-topology.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/bases/crs.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/cluster-template-topology/kustomization.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/cluster-template/kustomization.yaml create mode 100644 test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml rename test/e2e/data/shared/{v1.3 => v1.5}/metadata.yaml (81%) diff --git a/Makefile b/Makefile index 521cb675dcb1..bc034d589114 100644 --- a/Makefile +++ b/Makefile @@ -504,7 +504,7 @@ generate-modules: ## Run go mod tidy to ensure modules are up to date cd $(TEST_DIR); go mod tidy .PHONY: generate-e2e-templates -generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.0 v1.3 v1.4 main) ## Generate cluster templates for all versions +generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.0 v1.3 v1.4 v1.5 main) ## Generate cluster templates for all versions DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory @@ -523,6 +523,11 @@ generate-e2e-templates-v1.4: $(KUSTOMIZE) $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.4/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.4/cluster-template.yaml $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.4/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.4/cluster-template-topology.yaml +.PHONY: generate-e2e-templates-v1.5 +generate-e2e-templates-v1.5: $(KUSTOMIZE) + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.5/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.5/cluster-template.yaml + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.5/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.5/cluster-template-topology.yaml + .PHONY: generate-e2e-templates-main generate-e2e-templates-main: $(KUSTOMIZE) $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template.yaml diff --git a/cmd/clusterctl/hack/create-local-repository.py b/cmd/clusterctl/hack/create-local-repository.py index c99d5753f4f3..41bc8403a356 100755 --- a/cmd/clusterctl/hack/create-local-repository.py +++ b/cmd/clusterctl/hack/create-local-repository.py @@ -52,36 +52,36 @@ providers = { 'cluster-api': { 'componentsFile': 'core-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'CoreProvider', }, 'bootstrap-kubeadm': { 'componentsFile': 'bootstrap-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'BootstrapProvider', 'configFolder': 'bootstrap/kubeadm/config/default', }, 'control-plane-kubeadm': { 'componentsFile': 'control-plane-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'ControlPlaneProvider', 'configFolder': 'controlplane/kubeadm/config/default', }, 'infrastructure-docker': { 'componentsFile': 'infrastructure-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'InfrastructureProvider', 'configFolder': 'test/infrastructure/docker/config/default', }, 'infrastructure-in-memory': { 'componentsFile': 'infrastructure-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'InfrastructureProvider', 'configFolder': 'test/infrastructure/inmemory/config/default', }, 'runtime-extension-test': { 'componentsFile': 'runtime-extension-components.yaml', - 'nextVersion': 'v1.5.99', + 'nextVersion': 'v1.6.99', 'type': 'RuntimeExtensionProvider', 'configFolder': 'test/extension/config/default', }, diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index b3f0a30679f8..89994144d47c 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -119,8 +119,8 @@ This comes down to changing occurrences of the old version to the new version, e 3. Make sure all tests are green (also run `pull-cluster-api-e2e-full-main` and `pull-cluster-api-e2e-workload-upgrade-1-23-latest-main`). Prior art: -- 1.3 - https://github.com/kubernetes-sigs/cluster-api/pull/6834/files - 1.4 - https://github.com/kubernetes-sigs/cluster-api/pull/7692/files +- 1.5 - https://github.com/kubernetes-sigs/cluster-api/pull/8430/files #### Create a new GitHub milestone for the next release diff --git a/hack/tools/tilt-prepare/main.go b/hack/tools/tilt-prepare/main.go index 5be7f25bbc22..bdd45d13c9b1 100644 --- a/hack/tools/tilt-prepare/main.go +++ b/hack/tools/tilt-prepare/main.go @@ -70,7 +70,7 @@ const ( var ( // Defines the default version to be used for the provider CR if no version is specified in the tilt-provider.yaml|json file. - defaultProviderVersion = "v1.5.99" + defaultProviderVersion = "v1.6.99" // This data struct mirrors a subset of info from the providers struct in the tilt file // which is containing "hard-coded" tilt-provider.yaml files for the providers managed in the Cluster API repository. diff --git a/metadata.yaml b/metadata.yaml index 49d96b1c0106..de46d5e8fb0e 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -6,6 +6,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 6 + contract: v1beta1 - major: 1 minor: 5 contract: v1beta1 diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 2a1b7bdeaf02..27376005737b 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -66,7 +66,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() { }) }) -var _ = Describe("When testing clusterctl upgrades (v1.3=>current)", func() { +var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { return ClusterctlUpgradeSpecInput{ E2EConfig: e2eConfig, @@ -75,14 +75,14 @@ var _ = Describe("When testing clusterctl upgrades (v1.3=>current)", func() { ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, InfrastructureProvider: pointer.String("docker"), - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/clusterctl-{OS}-{ARCH}", + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/clusterctl-{OS}-{ARCH}", // We have to pin the providers because with `InitWithProvidersContract` the test would - // use the latest version for the contract (which is v1.4.X for v1beta1). - InitWithCoreProvider: "cluster-api:v1.3.6", - InitWithBootstrapProviders: []string{"kubeadm:v1.3.6"}, - InitWithControlPlaneProviders: []string{"kubeadm:v1.3.6"}, - InitWithInfrastructureProviders: []string{"docker:v1.3.6"}, - // We have to set this to an empty array as clusterctl v1.3 doesn't support + // use the latest version for the contract (which is v1.5.X for v1beta1). + InitWithCoreProvider: "cluster-api:v1.4.5", + InitWithBootstrapProviders: []string{"kubeadm:v1.4.5"}, + InitWithControlPlaneProviders: []string{"kubeadm:v1.4.5"}, + InitWithInfrastructureProviders: []string{"docker:v1.4.5"}, + // We have to set this to an empty array as clusterctl v1.4 doesn't support // runtime extension providers. If we don't do this the test will automatically // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, @@ -107,7 +107,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.3=>current)", func() { }) }) -var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.3=>current) [ClusterClass]", func() { +var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>current) [ClusterClass]", func() { ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { return ClusterctlUpgradeSpecInput{ E2EConfig: e2eConfig, @@ -116,14 +116,14 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.3=>cur ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, InfrastructureProvider: pointer.String("docker"), - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/clusterctl-{OS}-{ARCH}", + InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/clusterctl-{OS}-{ARCH}", // We have to pin the providers because with `InitWithProvidersContract` the test would - // use the latest version for the contract (which is v1.4.X for v1beta1). - InitWithCoreProvider: "cluster-api:v1.3.6", - InitWithBootstrapProviders: []string{"kubeadm:v1.3.6"}, - InitWithControlPlaneProviders: []string{"kubeadm:v1.3.6"}, - InitWithInfrastructureProviders: []string{"docker:v1.3.6"}, - // We have to set this to an empty array as clusterctl v1.3 doesn't support + // use the latest version for the contract (which is v1.5.X for v1beta1). + InitWithCoreProvider: "cluster-api:v1.4.5", + InitWithBootstrapProviders: []string{"kubeadm:v1.4.5"}, + InitWithControlPlaneProviders: []string{"kubeadm:v1.4.5"}, + InitWithInfrastructureProviders: []string{"docker:v1.4.5"}, + // We have to set this to an empty array as clusterctl v1.4 doesn't support // runtime extension providers. If we don't do this the test will automatically // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, @@ -148,7 +148,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.3=>cur }) }) -var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { +var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { return ClusterctlUpgradeSpecInput{ E2EConfig: e2eConfig, @@ -157,7 +157,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, InfrastructureProvider: pointer.String("docker"), - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-{OS}-{ARCH}", + 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. InitWithKubernetesVersion: "v1.27.3", @@ -179,7 +179,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { }) }) -var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>current) [ClusterClass]", func() { +var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>current) [ClusterClass]", func() { ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { return ClusterctlUpgradeSpecInput{ E2EConfig: e2eConfig, @@ -188,7 +188,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>cur ArtifactFolder: artifactFolder, SkipCleanup: skipCleanup, InfrastructureProvider: pointer.String("docker"), - InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-{OS}-{ARCH}", + 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. InitWithKubernetesVersion: "v1.27.3", diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml index dc11eb281596..6475029700d3 100644 --- a/test/e2e/config/docker.yaml +++ b/test/e2e/config/docker.yaml @@ -44,25 +44,25 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - - name: v1.3.6 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/core-components.yaml" + - name: v1.4.5 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/core-components.yaml" type: "url" contract: v1beta1 replacements: - - old: --metrics-addr=127.0.0.1:8080 - new: --metrics-addr=:8080 + - old: --metrics-addr=127.0.0.1:8080 + new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.3/metadata.yaml" - - name: v1.4.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/core-components.yaml" + - sourcePath: "../data/shared/v1.4/metadata.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/core-components.yaml" type: "url" contract: v1beta1 replacements: - - old: --metrics-addr=127.0.0.1:8080 - new: --metrics-addr=:8080 + - old: --metrics-addr=127.0.0.1:8080 + new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.4/metadata.yaml" - - name: v1.5.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: v1.6.99 # next; use manifest from source files value: ../../../config/default replacements: - old: --metrics-bind-addr=localhost:8080 @@ -82,25 +82,25 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - - name: v1.3.6 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/bootstrap-components.yaml" + - name: v1.4.5 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/bootstrap-components.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.3/metadata.yaml" - - name: v1.4.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/bootstrap-components.yaml" + - sourcePath: "../data/shared/v1.4/metadata.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/bootstrap-components.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.4/metadata.yaml" - - name: v1.5.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: v1.6.99 # next; use manifest from source files value: ../../../bootstrap/kubeadm/config/default replacements: - old: --metrics-bind-addr=localhost:8080 @@ -120,25 +120,25 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - - name: v1.3.6 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/control-plane-components.yaml" + - name: v1.4.5 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/control-plane-components.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.3/metadata.yaml" - - name: v1.4.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/control-plane-components.yaml" + - sourcePath: "../data/shared/v1.4/metadata.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/control-plane-components.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.4/metadata.yaml" - - name: v1.5.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: v1.6.99 # next; use manifest from source files value: ../../../controlplane/kubeadm/config/default replacements: - old: --metrics-bind-addr=localhost:8080 @@ -159,31 +159,31 @@ providers: files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - sourcePath: "../data/infrastructure-docker/v1.0/cluster-template.yaml" - - name: v1.3.6 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.3.6/infrastructure-components-development.yaml" + - name: v1.4.5 # supported release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.5/infrastructure-components-development.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.3/metadata.yaml" - - sourcePath: "../data/infrastructure-docker/v1.3/cluster-template.yaml" - - sourcePath: "../data/infrastructure-docker/v1.3/cluster-template-topology.yaml" - - sourcePath: "../data/infrastructure-docker/v1.3/clusterclass-quick-start.yaml" - - name: v1.4.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/infrastructure-components-development.yaml" + - sourcePath: "../data/shared/v1.4/metadata.yaml" + - sourcePath: "../data/infrastructure-docker/v1.4/cluster-template.yaml" + - sourcePath: "../data/infrastructure-docker/v1.4/cluster-template-topology.yaml" + - sourcePath: "../data/infrastructure-docker/v1.4/clusterclass-quick-start.yaml" + - name: v1.5.0 # latest published release in the v1beta1 series; this is used for v1beta1 --> main clusterctl upgrades test only. + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/infrastructure-components-development.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.4/metadata.yaml" - - sourcePath: "../data/infrastructure-docker/v1.4/cluster-template.yaml" - - sourcePath: "../data/infrastructure-docker/v1.4/cluster-template-topology.yaml" - - sourcePath: "../data/infrastructure-docker/v1.4/clusterclass-quick-start.yaml" - - name: v1.5.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - sourcePath: "../data/infrastructure-docker/v1.5/cluster-template.yaml" + - sourcePath: "../data/infrastructure-docker/v1.5/cluster-template-topology.yaml" + - sourcePath: "../data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml" + - name: v1.6.99 # next; use manifest from source files value: ../../../test/infrastructure/docker/config/default replacements: - old: --metrics-bind-addr=localhost:8080 @@ -213,21 +213,21 @@ providers: - name: in-memory type: InfrastructureProvider versions: - - name: v1.5.99 # next; use manifest from source files + - name: v1.6.99 # next; use manifest from source files value: ../../../test/infrastructure/inmemory/config/default replacements: - old: --metrics-bind-addr=localhost:8080 new: "--metrics-bind-addr=:8080\n - --logging-format=json" files: - # Add cluster templates - - sourcePath: "../data/infrastructure-inmemory/main/clusterclass-in-memory.yaml" - - sourcePath: "../data/infrastructure-inmemory/main/cluster-template.yaml" - - sourcePath: "../data/shared/main/metadata.yaml" + # Add cluster templates + - sourcePath: "../data/infrastructure-inmemory/main/clusterclass-in-memory.yaml" + - sourcePath: "../data/infrastructure-inmemory/main/cluster-template.yaml" + - sourcePath: "../data/shared/main/metadata.yaml" - name: test-extension type: RuntimeExtensionProvider versions: - - name: v1.5.99 # next; use manifest from source files + - name: v1.6.99 # next; use manifest from source files value: ../../../test/extension/config/default files: - sourcePath: "../data/shared/main/metadata.yaml" 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 new file mode 100644 index 000000000000..30079167200d --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-kcp.yaml @@ -0,0 +1,91 @@ +--- +# DockerCluster object referenced by the Cluster object +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerCluster +metadata: + name: '${CLUSTER_NAME}' +spec: + failureDomains: + fd1: + controlPlane: true + fd2: + controlPlane: true + fd3: + controlPlane: true + fd4: + controlPlane: false + fd5: + controlPlane: false + fd6: + controlPlane: false + fd7: + controlPlane: false + fd8: + controlPlane: false +--- +# Cluster object with +# - Reference to the KubeadmControlPlane object +# - the label cni=${CLUSTER_NAME}-crs-0, so the cluster can be selected by the ClusterResourceSet. +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster +metadata: + name: '${CLUSTER_NAME}' + labels: + cni: "${CLUSTER_NAME}-crs-0" +spec: + clusterNetwork: + services: + cidrBlocks: ['${DOCKER_SERVICE_CIDRS}'] + pods: + cidrBlocks: ['${DOCKER_POD_CIDRS}'] + serviceDomain: '${DOCKER_SERVICE_DOMAIN}' + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerCluster + name: '${CLUSTER_NAME}' + controlPlaneRef: + kind: KubeadmControlPlane + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + name: "${CLUSTER_NAME}-control-plane" +--- +# DockerMachineTemplate object referenced by the KubeadmControlPlane object +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachineTemplate +metadata: + name: "${CLUSTER_NAME}-control-plane" +spec: + template: + spec: + extraMounts: + - containerPath: "/var/run/docker.sock" + hostPath: "/var/run/docker.sock" + # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. + preLoadImages: ${DOCKER_PRELOAD_IMAGES:-[]} +--- +# KubeadmControlPlane referenced by the Cluster object with +# - the label kcp-adoption.step2, because it should be created in the second step of the kcp-adoption test. +kind: KubeadmControlPlane +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +metadata: + name: "${CLUSTER_NAME}-control-plane" + labels: + kcp-adoption.step2: "" +spec: + replicas: ${CONTROL_PLANE_MACHINE_COUNT} + machineTemplate: + infrastructureRef: + kind: DockerMachineTemplate + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + name: "${CLUSTER_NAME}-control-plane" + kubeadmConfigSpec: + clusterConfiguration: + controllerManager: + extraArgs: {enable-hostpath-provisioner: 'true'} + apiServer: + # 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. + joinConfiguration: + nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + version: "${KUBERNETES_VERSION}" diff --git a/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-topology.yaml b/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-topology.yaml new file mode 100644 index 000000000000..529fc15f69d2 --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/cluster-with-topology.yaml @@ -0,0 +1,59 @@ +apiVersion: cluster.x-k8s.io/v1beta1 +kind: Cluster +metadata: + name: '${CLUSTER_NAME}' + namespace: default + labels: + cni: "${CLUSTER_NAME}-crs-0" +spec: + clusterNetwork: + services: + cidrBlocks: ['${DOCKER_SERVICE_CIDRS}'] + pods: + cidrBlocks: ['${DOCKER_POD_CIDRS}'] + serviceDomain: '${DOCKER_SERVICE_DOMAIN}' + topology: + class: "quick-start" + version: "${KUBERNETES_VERSION}" + controlPlane: + metadata: + labels: + Cluster.topology.controlPlane.label: "Cluster.topology.controlPlane.labelValue" + # Note: this label is propagated to Nodes. + Cluster.topology.controlPlane.label.node.cluster.x-k8s.io: "Cluster.topology.controlPlane.nodeLabelValue" + annotations: + Cluster.topology.controlPlane.annotation: "Cluster.topology.controlPlane.annotationValue" + nodeDeletionTimeout: "30s" + nodeVolumeDetachTimeout: "5m" + replicas: ${CONTROL_PLANE_MACHINE_COUNT} + workers: + machineDeployments: + - class: "default-worker" + name: "md-0" + metadata: + labels: + Cluster.topology.machineDeployment.label: "Cluster.topology.machineDeployment.labelValue" + # Note: this label is propagated to Nodes. + Cluster.topology.machineDeployment.label.node.cluster.x-k8s.io: "Cluster.topology.machineDeployment.nodeLabelValue" + annotations: + Cluster.topology.machineDeployment.annotation: "Cluster.topology.machineDeployment.annotationValue" + nodeDeletionTimeout: "30s" + nodeVolumeDetachTimeout: "5m" + minReadySeconds: 5 + replicas: ${WORKER_MACHINE_COUNT} + failureDomain: fd4 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: "20%" + maxUnavailable: 0 + variables: + # We set an empty value to use the default tag kubeadm init is using. + - name: etcdImageTag + value: "" + # We set an empty value to use the default tag kubeadm init is using. + - name: coreDNSImageTag + value: "" + - name: preLoadImages + # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. + value: ${DOCKER_PRELOAD_IMAGES:-[]} diff --git a/test/e2e/data/infrastructure-docker/v1.5/bases/crs.yaml b/test/e2e/data/infrastructure-docker/v1.5/bases/crs.yaml new file mode 100644 index 000000000000..b1b61237dc62 --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/crs.yaml @@ -0,0 +1,24 @@ +--- +# ConfigMap object referenced by the ClusterResourceSet object and with +# the CNI resource defined in the test config file +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cni-${CLUSTER_NAME}-crs-0" +data: ${CNI_RESOURCES} +binaryData: +--- +# ClusterResourceSet object with +# a selector that targets all the Cluster with label cni=${CLUSTER_NAME}-crs-0 +apiVersion: addons.cluster.x-k8s.io/v1beta1 +kind: ClusterResourceSet +metadata: + name: "${CLUSTER_NAME}-crs-0" +spec: + strategy: ApplyOnce + clusterSelector: + matchLabels: + cni: "${CLUSTER_NAME}-crs-0" + resources: + - name: "cni-${CLUSTER_NAME}-crs-0" + kind: ConfigMap diff --git a/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml b/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml new file mode 100644 index 000000000000..5d42a2cf5e6a --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/bases/md.yaml @@ -0,0 +1,51 @@ +--- +# DockerMachineTemplate referenced by the MachineDeployment and with +# - extraMounts for the docker sock, thus allowing self-hosting test +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachineTemplate +metadata: + name: "${CLUSTER_NAME}-md-0" +spec: + template: + spec: + extraMounts: + - containerPath: "/var/run/docker.sock" + hostPath: "/var/run/docker.sock" + # The DOCKER_PRELOAD_IMAGES variable gets set in self-hosted E2E tests to the list of images of the E2E configuration. + preLoadImages: ${DOCKER_PRELOAD_IMAGES:-[]} +--- +# KubeadmConfigTemplate referenced by the MachineDeployment +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: "${CLUSTER_NAME}-md-0" +spec: + template: + spec: + joinConfiguration: + nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. +--- +# MachineDeployment object +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachineDeployment +metadata: + name: "${CLUSTER_NAME}-md-0" +spec: + clusterName: "${CLUSTER_NAME}" + replicas: ${WORKER_MACHINE_COUNT} + selector: + matchLabels: + template: + spec: + clusterName: "${CLUSTER_NAME}" + version: "${KUBERNETES_VERSION}" + bootstrap: + configRef: + name: "${CLUSTER_NAME}-md-0" + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + infrastructureRef: + name: "${CLUSTER_NAME}-md-0" + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachineTemplate + failureDomain: fd4 diff --git a/test/e2e/data/infrastructure-docker/v1.5/cluster-template-topology/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.5/cluster-template-topology/kustomization.yaml new file mode 100644 index 000000000000..44c449548234 --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/cluster-template-topology/kustomization.yaml @@ -0,0 +1,3 @@ +resources: + - ../bases/cluster-with-topology.yaml + - ../bases/crs.yaml diff --git a/test/e2e/data/infrastructure-docker/v1.5/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.5/cluster-template/kustomization.yaml new file mode 100644 index 000000000000..adb5919cec6f --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/cluster-template/kustomization.yaml @@ -0,0 +1,5 @@ +bases: +- ../bases/cluster-with-kcp.yaml +- ../bases/md.yaml +- ../bases/crs.yaml + 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 new file mode 100644 index 000000000000..5a0c22c59b32 --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.5/clusterclass-quick-start.yaml @@ -0,0 +1,427 @@ +apiVersion: cluster.x-k8s.io/v1beta1 +kind: ClusterClass +metadata: + name: quick-start +spec: + controlPlane: + metadata: + labels: + ClusterClass.controlPlane.label: "ClusterClass.controlPlane.labelValue" + annotations: + ClusterClass.controlPlane.annotation: "ClusterClass.controlPlane.annotationValue" + ref: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + name: quick-start-control-plane + machineInfrastructure: + ref: + kind: DockerMachineTemplate + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + name: quick-start-control-plane + machineHealthCheck: + maxUnhealthy: 100% + unhealthyConditions: + - type: e2e.remediation.condition + status: "False" + timeout: 20s + infrastructure: + ref: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerClusterTemplate + name: quick-start-cluster + workers: + machineDeployments: + - class: default-worker + template: + metadata: + labels: + ClusterClass.machineDeployment.label: "ClusterClass.machineDeployment.labelValue" + annotations: + ClusterClass.machineDeployment.annotation: "ClusterClass.machineDeployment.annotationValue" + bootstrap: + ref: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + name: quick-start-default-worker-bootstraptemplate + infrastructure: + ref: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachineTemplate + name: quick-start-default-worker-machinetemplate + machineHealthCheck: + maxUnhealthy: 100% + unhealthyConditions: + - type: e2e.remediation.condition + status: "False" + timeout: 20s + variables: + - name: lbImageRepository + required: true + schema: + openAPIV3Schema: + type: string + default: kindest + - name: etcdImageTag + required: true + schema: + openAPIV3Schema: + type: string + default: "" + example: "3.5.3-0" + description: "etcdImageTag sets the tag for the etcd image." + - name: coreDNSImageTag + required: true + schema: + openAPIV3Schema: + type: string + default: "" + example: "v1.8.5" + description: "coreDNSImageTag sets the tag for the coreDNS image." + - name: kubeadmControlPlaneMaxSurge + required: false + schema: + openAPIV3Schema: + type: string + default: "" + example: "0" + description: "kubeadmControlPlaneMaxSurge is the maximum number of control planes that can be scheduled above or under the desired number of control plane machines." + - name: preLoadImages + required: false + schema: + openAPIV3Schema: + default: [] + type: array + items: + type: string + description: "preLoadImages sets the images for the docker machines to preload." + - name: controlPlaneTaint + required: false + schema: + openAPIV3Schema: + type: boolean + default: true + patches: + - name: lbImageRepository + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerClusterTemplate + matchResources: + infrastructureCluster: true + jsonPatches: + - op: add + path: "/spec/template/spec/loadBalancer" + valueFrom: + template: | + imageRepository: {{ .lbImageRepository }} + # We have to pin the cgroupDriver to cgroupfs for Kubernetes < v1.24 because kind does not support systemd for those versions, but kubeadm >= 1.21 defaults to systemd. + - name: cgroupDriver-controlPlane + description: | + Sets the cgroupDriver to cgroupfs if a Kubernetes version < v1.24 is referenced. + This is required because kind and the node images do not support the default + systemd cgroupDriver for kubernetes < v1.24. + enabledIf: '{{ semverCompare "<= v1.23" .builtin.controlPlane.version }}' + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" + value: cgroupfs + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" + value: cgroupfs + - name: cgroupDriver-machineDeployment + description: | + Sets the cgroupDriver to cgroupfs if a Kubernetes version < v1.24 is referenced. + This is required because kind and the node images do not support the default + systemd cgroupDriver for kubernetes < v1.24. + enabledIf: '{{ semverCompare "<= v1.23" .builtin.machineDeployment.version }}' + definitions: + - selector: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + matchResources: + machineDeploymentClass: + names: + - '*-worker' + jsonPatches: + - op: add + path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cgroup-driver" + value: cgroupfs + - name: etcdImageTag + description: "Sets tag to use for the etcd image in the KubeadmControlPlane." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/etcd" + valueFrom: + template: | + local: + imageTag: {{ .etcdImageTag }} + - name: coreDNSImageTag + description: "Sets tag to use for the etcd image in the KubeadmControlPlane." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/dns" + valueFrom: + template: | + imageTag: {{ .coreDNSImageTag }} + - name: preloadImages + description: | + Sets the container images to preload to the node that is used for running dockerMachines. + This is especially required for self-hosted e2e tests to ensure the required controller images to be available + and reduce load to public registries. + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachineTemplate + matchResources: + controlPlane: true + machineDeploymentClass: + names: + - default-worker + jsonPatches: + - op: add + path: "/spec/template/spec/preLoadImages" + valueFrom: + variable: preLoadImages + - name: kubeadmControlPlaneMaxSurge + description: "Sets the maxSurge value used for rolloutStrategy in the KubeadmControlPlane." + enabledIf: '{{ ne .kubeadmControlPlaneMaxSurge "" }}' + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: /spec/template/spec/rolloutStrategy/rollingUpdate/maxSurge + valueFrom: + template: "{{ .kubeadmControlPlaneMaxSurge }}" + - name: controlPlaneTaint + enabledIf: "{{ not .controlPlaneTaint }}" + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/taints" + value: [] + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/taints" + value: [] + - name: podSecurityStandard + description: "Adds an admission configuration for PodSecurity to the kube-apiserver." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs" + value: + admission-control-config-file: "/etc/kubernetes/kube-apiserver-admission-pss.yaml" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraVolumes" + value: + - name: admission-pss + hostPath: /etc/kubernetes/kube-apiserver-admission-pss.yaml + mountPath: /etc/kubernetes/kube-apiserver-admission-pss.yaml + readOnly: true + pathType: "File" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/files" + valueFrom: + template: | + - content: | + apiVersion: apiserver.config.k8s.io/v1 + kind: AdmissionConfiguration + plugins: + - name: PodSecurity + configuration: + apiVersion: pod-security.admission.config.k8s.io/v1{{ if semverCompare "< v1.25" .builtin.controlPlane.version }}beta1{{ end }} + kind: PodSecurityConfiguration + defaults: + enforce: "baseline" + enforce-version: "latest" + audit: "baseline" + audit-version: "latest" + warn: "baseline" + warn-version: "latest" + exemptions: + usernames: [] + runtimeClasses: [] + namespaces: [kube-system] + path: /etc/kubernetes/kube-apiserver-admission-pss.yaml + enabledIf: '{{ semverCompare ">= v1.24" .builtin.controlPlane.version }}' +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerClusterTemplate +metadata: + name: quick-start-cluster + labels: + InfrastructureClusterTemplate.label: "InfrastructureClusterTemplate.labelValue" + annotations: + InfrastructureClusterTemplate.annotation: "InfrastructureClusterTemplate.annotationValue" +spec: + template: + metadata: + labels: + InfrastructureClusterTemplate.template.label: "InfrastructureClusterTemplate.template.labelValue" + annotations: + InfrastructureClusterTemplate.template.annotation: "InfrastructureClusterTemplate.template.annotationValue" + spec: + failureDomains: + fd1: + controlPlane: true + fd2: + controlPlane: true + fd3: + controlPlane: true + fd4: + controlPlane: false + fd5: + controlPlane: false + fd6: + controlPlane: false + fd7: + controlPlane: false + fd8: + controlPlane: false +--- +kind: KubeadmControlPlaneTemplate +apiVersion: controlplane.cluster.x-k8s.io/v1beta1 +metadata: + name: quick-start-control-plane + labels: + ControlPlaneTemplate.label: "ControlPlaneTemplate.labelValue" + annotations: + ControlPlaneTemplate.annotation: "ControlPlaneTemplate.annotationValue" +spec: + template: + metadata: + labels: + ControlPlaneTemplate.template.label: "ControlPlaneTemplate.template.labelValue" + annotations: + ControlPlaneTemplate.template.annotation: "ControlPlaneTemplate.template.annotationValue" + spec: + rolloutBefore: + certificatesExpiryDays: 21 + machineTemplate: + metadata: + labels: + ControlPlaneTemplate.machineTemplate.label: "ControlPlaneTemplate.machineTemplate.labelValue" + annotations: + ControlPlaneTemplate.machineTemplate.annotation: "ControlPlaneTemplate.machineTemplate.annotationValue" + nodeDrainTimeout: 1s + kubeadmConfigSpec: + clusterConfiguration: + controllerManager: + extraArgs: { enable-hostpath-provisioner: 'true' } + apiServer: + # 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: + # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found + 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: + # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found + criSocket: unix:///var/run/containerd/containerd.sock + kubeletExtraArgs: + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + fail-swap-on: "false" +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachineTemplate +metadata: + name: quick-start-control-plane + labels: + InfraMachineTemplate.controlPlane.label: "InfraMachineTemplate.controlPlane.labelValue" + annotations: + InfraMachineTemplate.controlPlane.annotation: "InfraMachineTemplate.controlPlane.annotationValue" +spec: + template: + metadata: + labels: + InfraMachineTemplate.controlPlane.template.label: "InfraMachineTemplate.controlPlane.template.labelValue" + annotations: + 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" + extraMounts: + - containerPath: "/var/run/docker.sock" + hostPath: "/var/run/docker.sock" +--- +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachineTemplate +metadata: + name: quick-start-default-worker-machinetemplate + labels: + InfraMachineTemplate.machineDeployment.label: "InfraMachineTemplate.machineDeployment.labelValue" + annotations: + InfraMachineTemplate.machineDeployment.annotation: "InfraMachineTemplate.machineDeployment.annotationValue" +spec: + template: + metadata: + labels: + InfraMachineTemplate.machineDeployment.template.label: "InfraMachineTemplate.machineDeployment.template.labelValue" + annotations: + 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" + extraMounts: + - containerPath: "/var/run/docker.sock" + hostPath: "/var/run/docker.sock" +--- +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: quick-start-default-worker-bootstraptemplate + labels: + BootstrapConfigTemplate.machineDeployment.label: "BootstrapConfigTemplate.machineDeployment.labelValue" + annotations: + BootstrapConfigTemplate.machineDeployment.annotation: "BootstrapConfigTemplate.machineDeployment.annotationValue" +spec: + template: + metadata: + labels: + BootstrapConfigTemplate.machineDeployment.template.label: "BootstrapConfigTemplate.machineDeployment.template.labelValue" + annotations: + BootstrapConfigTemplate.machineDeployment.template.annotation: "BootstrapConfigTemplate.machineDeployment.template.annotationValue" + spec: + joinConfiguration: + nodeRegistration: + # We have to set the criSocket to containerd as kubeadm defaults to docker runtime if both containerd and docker sockets are found + criSocket: unix:///var/run/containerd/containerd.sock + kubeletExtraArgs: + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' + fail-swap-on: "false" + diff --git a/test/e2e/data/shared/main/metadata.yaml b/test/e2e/data/shared/main/metadata.yaml index 87cd651cb618..0fedda628239 100644 --- a/test/e2e/data/shared/main/metadata.yaml +++ b/test/e2e/data/shared/main/metadata.yaml @@ -1,6 +1,9 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 6 + contract: v1beta1 - major: 1 minor: 5 contract: v1beta1 diff --git a/test/e2e/data/shared/v1.3/metadata.yaml b/test/e2e/data/shared/v1.5/metadata.yaml similarity index 81% rename from test/e2e/data/shared/v1.3/metadata.yaml rename to test/e2e/data/shared/v1.5/metadata.yaml index ff9cdc10131b..87cd651cb618 100644 --- a/test/e2e/data/shared/v1.3/metadata.yaml +++ b/test/e2e/data/shared/v1.5/metadata.yaml @@ -1,6 +1,12 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 5 + contract: v1beta1 + - major: 1 + minor: 4 + contract: v1beta1 - major: 1 minor: 3 contract: v1beta1