diff --git a/Makefile b/Makefile index ec15bb5c3de3..4b58cef3fb81 100644 --- a/Makefile +++ b/Makefile @@ -531,7 +531,7 @@ generate-doctoc: TRACE=$(TRACE) ./hack/generate-doctoc.sh .PHONY: generate-e2e-templates -generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.0 v1.4 v1.5 main) ## Generate cluster templates for all versions +generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.0 v1.5 v1.6 main) ## Generate cluster templates for all versions DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory @@ -540,16 +540,16 @@ INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory generate-e2e-templates-v1.0: $(KUSTOMIZE) $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.0/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.0/cluster-template.yaml -.PHONY: generate-e2e-templates-v1.4 -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-v1.6 +generate-e2e-templates-v1.6: $(KUSTOMIZE) + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/cluster-template.yaml + $(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/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 41bc8403a356..1cb362ded3d9 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.6.99', + 'nextVersion': 'v1.7.99', 'type': 'CoreProvider', }, 'bootstrap-kubeadm': { 'componentsFile': 'bootstrap-components.yaml', - 'nextVersion': 'v1.6.99', + 'nextVersion': 'v1.7.99', 'type': 'BootstrapProvider', 'configFolder': 'bootstrap/kubeadm/config/default', }, 'control-plane-kubeadm': { 'componentsFile': 'control-plane-components.yaml', - 'nextVersion': 'v1.6.99', + 'nextVersion': 'v1.7.99', 'type': 'ControlPlaneProvider', 'configFolder': 'controlplane/kubeadm/config/default', }, 'infrastructure-docker': { 'componentsFile': 'infrastructure-components.yaml', - 'nextVersion': 'v1.6.99', + 'nextVersion': 'v1.7.99', 'type': 'InfrastructureProvider', 'configFolder': 'test/infrastructure/docker/config/default', }, 'infrastructure-in-memory': { 'componentsFile': 'infrastructure-components.yaml', - 'nextVersion': 'v1.6.99', + 'nextVersion': 'v1.7.99', 'type': 'InfrastructureProvider', 'configFolder': 'test/infrastructure/inmemory/config/default', }, 'runtime-extension-test': { 'componentsFile': 'runtime-extension-components.yaml', - 'nextVersion': 'v1.6.99', + 'nextVersion': 'v1.7.99', 'type': 'RuntimeExtensionProvider', 'configFolder': 'test/extension/config/default', }, diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index dd6fa9ee6496..4794d8af14b1 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -121,6 +121,7 @@ Prior art: * 1.4 - https://github.com/kubernetes-sigs/cluster-api/pull/7692/files * 1.5 - https://github.com/kubernetes-sigs/cluster-api/pull/8430/files +* 1.6 - https://github.com/kubernetes-sigs/cluster-api/pull/9097/files #### Create a new GitHub milestone for the next release diff --git a/hack/tools/internal/tilt-prepare/main.go b/hack/tools/internal/tilt-prepare/main.go index bd97f5111259..0c825b94a9c6 100644 --- a/hack/tools/internal/tilt-prepare/main.go +++ b/hack/tools/internal/tilt-prepare/main.go @@ -69,7 +69,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.6.99" + defaultProviderVersion = "v1.7.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/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 4a51774b1bf6..bca33dcde73d 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -59,6 +59,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() { // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, // NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v1.0/bases. + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. InitWithKubernetesVersion: "v1.23.17", WorkloadKubernetesVersion: "v1.23.17", MgmtFlavor: "topology", @@ -67,9 +68,9 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() { }) }) -var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { - // Get v1.4 latest stable release - version := "1.4" +var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { + // Get v1.5 latest stable release + version := "1.5" stableRelease, err := GetStableReleaseOfMinor(ctx, version) Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { @@ -82,24 +83,24 @@ var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { InfrastructureProvider: ptr.To("docker"), InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease), // We have to pin the providers because with `InitWithProvidersContract` the test would - // use the latest version for the contract (which is v1.5.X for v1beta1). + // use the latest version for the contract (which is v1.6.X for v1beta1). InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease), InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)}, InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)}, InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease)}, InitWithProvidersContract: "v1beta1", - // 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.3", - WorkloadKubernetesVersion: "v1.27.3", + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. + InitWithKubernetesVersion: "v1.28.0", + WorkloadKubernetesVersion: "v1.28.0", MgmtFlavor: "topology", WorkloadFlavor: "", } }) }) -var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>current) [ClusterClass]", func() { - // Get v1.4 latest stable release - version := "1.4" +var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>current) [ClusterClass]", func() { + // Get v1.5 latest stable release + version := "1.5" stableRelease, err := GetStableReleaseOfMinor(ctx, version) Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { @@ -112,27 +113,27 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>cur InfrastructureProvider: ptr.To("docker"), InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease), // We have to pin the providers because with `InitWithProvidersContract` the test would - // use the latest version for the contract (which is v1.5.X for v1beta1). + // use the latest version for the contract (which is v1.6.X for v1beta1). InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease), InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)}, InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)}, InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease)}, InitWithProvidersContract: "v1beta1", - // 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.3", - WorkloadKubernetesVersion: "v1.27.3", + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. + InitWithKubernetesVersion: "v1.28.0", + WorkloadKubernetesVersion: "v1.28.0", MgmtFlavor: "topology", WorkloadFlavor: "topology", } }) }) -var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { +var _ = Describe("When testing clusterctl upgrades (v1.6=>current)", func() { + // Get v1.5 latest stable release + version := "1.6" + stableRelease, err := GetStableReleaseOfMinor(ctx, version) + Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { - // Get v1.5 latest stable release - version := "1.5" - stableRelease, err := GetStableReleaseOfMinor(ctx, version) - Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) return ClusterctlUpgradeSpecInput{ E2EConfig: e2eConfig, ClusterctlConfigPath: clusterctlConfigPath, @@ -142,7 +143,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { InfrastructureProvider: ptr.To("docker"), InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease), InitWithProvidersContract: "v1beta1", - // 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. + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. InitWithKubernetesVersion: "v1.28.0", WorkloadKubernetesVersion: "v1.28.0", MgmtFlavor: "topology", @@ -151,9 +152,9 @@ var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() { }) }) -var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>current) [ClusterClass]", func() { +var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.6=>current) [ClusterClass]", func() { // Get v1.5 latest stable release - version := "1.5" + version := "1.6" stableRelease, err := GetStableReleaseOfMinor(ctx, version) Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version) ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput { @@ -166,7 +167,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>cur InfrastructureProvider: ptr.To("docker"), InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease), InitWithProvidersContract: "v1beta1", - // 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. + // Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version. InitWithKubernetesVersion: "v1.28.0", WorkloadKubernetesVersion: "v1.28.0", MgmtFlavor: "topology", diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml index f900b1eb42e8..19fb3043bba4 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: "{go://sigs.k8s.io/cluster-api@v1.4}" # 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/{go://sigs.k8s.io/cluster-api@v1.4}/core-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.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/{go://sigs.k8s.io/cluster-api@v1.5}/core-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: "{go://sigs.k8s.io/cluster-api@v1.5}" # 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/{go://sigs.k8s.io/cluster-api@v1.5}/core-components.yaml" + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.6}" # 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/{go://sigs.k8s.io/cluster-api@v1.6}/core-components.yaml" type: "url" contract: v1beta1 replacements: - old: --metrics-addr=127.0.0.1:8080 new: --metrics-addr=:8080 files: - - sourcePath: "../data/shared/v1.5/metadata.yaml" - - name: v1.6.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.6/metadata.yaml" + - name: v1.7.99 # next; use manifest from source files value: ../../../config/default replacements: - old: "--leader-elect" @@ -82,25 +82,25 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.4}" # 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/{go://sigs.k8s.io/cluster-api@v1.4}/bootstrap-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.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/{go://sigs.k8s.io/cluster-api@v1.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.4/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.5}" # 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/{go://sigs.k8s.io/cluster-api@v1.5}/bootstrap-components.yaml" + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.6}" # 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/{go://sigs.k8s.io/cluster-api@v1.6}/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.5/metadata.yaml" - - name: v1.6.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.6/metadata.yaml" + - name: v1.7.99 # next; use manifest from source files value: ../../../bootstrap/kubeadm/config/default replacements: - old: "--leader-elect" @@ -120,25 +120,25 @@ providers: new: --metrics-addr=:8080 files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.4}" # 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/{go://sigs.k8s.io/cluster-api@v1.4}/control-plane-components.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.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/{go://sigs.k8s.io/cluster-api@v1.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.4/metadata.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.5}" # 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/{go://sigs.k8s.io/cluster-api@v1.5}/control-plane-components.yaml" + - sourcePath: "../data/shared/v1.5/metadata.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.6}" # 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/{go://sigs.k8s.io/cluster-api@v1.6}/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.5/metadata.yaml" - - name: v1.6.99 # next; use manifest from source files + - sourcePath: "../data/shared/v1.6/metadata.yaml" + - name: v1.7.99 # next; use manifest from source files value: ../../../controlplane/kubeadm/config/default replacements: - old: "--leader-elect" @@ -159,31 +159,31 @@ providers: files: - sourcePath: "../data/shared/v1.0/metadata.yaml" - sourcePath: "../data/infrastructure-docker/v1.0/cluster-template.yaml" - - name: "{go://sigs.k8s.io/cluster-api@v1.4}" # 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/{go://sigs.k8s.io/cluster-api@v1.4}/infrastructure-components-development.yaml" + - name: "{go://sigs.k8s.io/cluster-api@v1.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/{go://sigs.k8s.io/cluster-api@v1.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.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: "{go://sigs.k8s.io/cluster-api@v1.5}" # 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/{go://sigs.k8s.io/cluster-api@v1.5}/infrastructure-components-development.yaml" + - 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: "{go://sigs.k8s.io/cluster-api@v1.6}" # 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/{go://sigs.k8s.io/cluster-api@v1.6}/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.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 + - sourcePath: "../data/shared/v1.6/metadata.yaml" + - sourcePath: "../data/infrastructure-docker/v1.6/cluster-template.yaml" + - sourcePath: "../data/infrastructure-docker/v1.6/cluster-template-topology.yaml" + - sourcePath: "../data/infrastructure-docker/v1.6/clusterclass-quick-start.yaml" + - name: v1.7.99 # next; use manifest from source files value: ../../../test/infrastructure/docker/config/default replacements: - old: "--leader-elect" @@ -213,7 +213,7 @@ providers: - name: in-memory type: InfrastructureProvider versions: - - name: v1.6.99 # next; use manifest from source files + - name: v1.7.99 # next; use manifest from source files value: ../../../test/infrastructure/inmemory/config/default replacements: - old: "--leader-elect" @@ -227,7 +227,7 @@ providers: - name: test-extension type: RuntimeExtensionProvider versions: - - name: v1.6.99 # next; use manifest from source files + - name: v1.7.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.4/bases/cluster-with-kcp.yaml b/test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-kcp.yaml similarity index 79% rename from test/e2e/data/infrastructure-docker/v1.4/bases/cluster-with-kcp.yaml rename to test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-kcp.yaml index fca5b54c8166..30079167200d 100644 --- a/test/e2e/data/infrastructure-docker/v1.4/bases/cluster-with-kcp.yaml +++ b/test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-kcp.yaml @@ -56,8 +56,6 @@ 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.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock" @@ -87,15 +85,7 @@ 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: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" + nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. joinConfiguration: - nodeRegistration: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" + 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.4/bases/cluster-with-topology.yaml b/test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-topology.yaml similarity index 76% rename from test/e2e/data/infrastructure-docker/v1.4/bases/cluster-with-topology.yaml rename to test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-topology.yaml index 529fc15f69d2..1fa907f3aab9 100644 --- a/test/e2e/data/infrastructure-docker/v1.4/bases/cluster-with-topology.yaml +++ b/test/e2e/data/infrastructure-docker/v1.6/bases/cluster-with-topology.yaml @@ -47,6 +47,22 @@ spec: rollingUpdate: maxSurge: "20%" maxUnavailable: 0 + machinePools: + - class: "default-worker" + name: "mp-0" + metadata: + labels: + Cluster.topology.machinePool.label: "Cluster.topology.machinePool.labelValue" + # Note: this label is propagated to Nodes. + Cluster.topology.machinePool.label.node.cluster.x-k8s.io: "Cluster.topology.machinePool.nodeLabelValue" + annotations: + Cluster.topology.machinePool.annotation: "Cluster.topology.machinePool.annotationValue" + nodeDeletionTimeout: "30s" + nodeVolumeDetachTimeout: "5m" + minReadySeconds: 5 + replicas: ${WORKER_MACHINE_COUNT} + failureDomains: + - fd4 variables: # We set an empty value to use the default tag kubeadm init is using. - name: etcdImageTag diff --git a/test/e2e/data/infrastructure-docker/v1.4/bases/crs.yaml b/test/e2e/data/infrastructure-docker/v1.6/bases/crs.yaml similarity index 100% rename from test/e2e/data/infrastructure-docker/v1.4/bases/crs.yaml rename to test/e2e/data/infrastructure-docker/v1.6/bases/crs.yaml diff --git a/test/e2e/data/infrastructure-docker/v1.4/bases/md.yaml b/test/e2e/data/infrastructure-docker/v1.6/bases/md.yaml similarity index 75% rename from test/e2e/data/infrastructure-docker/v1.4/bases/md.yaml rename to test/e2e/data/infrastructure-docker/v1.6/bases/md.yaml index 777f8e75601d..5d42a2cf5e6a 100644 --- a/test/e2e/data/infrastructure-docker/v1.4/bases/md.yaml +++ b/test/e2e/data/infrastructure-docker/v1.6/bases/md.yaml @@ -8,8 +8,6 @@ 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.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b" extraMounts: - containerPath: "/var/run/docker.sock" hostPath: "/var/run/docker.sock" @@ -25,11 +23,7 @@ spec: template: spec: joinConfiguration: - nodeRegistration: - criSocket: unix:///var/run/containerd/containerd.sock - kubeletExtraArgs: - eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" + 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 diff --git a/test/e2e/data/infrastructure-docker/v1.6/bases/mp.yaml b/test/e2e/data/infrastructure-docker/v1.6/bases/mp.yaml new file mode 100644 index 000000000000..11ca197c8acd --- /dev/null +++ b/test/e2e/data/infrastructure-docker/v1.6/bases/mp.yaml @@ -0,0 +1,47 @@ +--- +# MachinePool which references the DockerMachinePool and KubeadmConfigTemplate below +apiVersion: cluster.x-k8s.io/v1beta1 +kind: MachinePool +metadata: + name: "${CLUSTER_NAME}-mp-0" +spec: + clusterName: '${CLUSTER_NAME}' + replicas: ${WORKER_MACHINE_COUNT} + template: + spec: + bootstrap: + configRef: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfig + name: "${CLUSTER_NAME}-mp-0-config" + clusterName: '${CLUSTER_NAME}' + infrastructureRef: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachinePool + name: "${CLUSTER_NAME}-dmp-0" + version: "${KUBERNETES_VERSION}" + failureDomains: + - fd4 + - fd5 + - fd6 + - fd7 + - fd8 +--- +# DockerMachinePool using default values referenced by the MachinePool +apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachinePool +metadata: + name: "${CLUSTER_NAME}-dmp-0" +spec: + template: + # 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 MachinePool +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfig +metadata: + name: "${CLUSTER_NAME}-mp-0-config" +spec: + joinConfiguration: + nodeRegistration: {} # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. diff --git a/test/e2e/data/infrastructure-docker/v1.4/cluster-template-topology/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.6/cluster-template-topology/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-docker/v1.4/cluster-template-topology/kustomization.yaml rename to test/e2e/data/infrastructure-docker/v1.6/cluster-template-topology/kustomization.yaml diff --git a/test/e2e/data/infrastructure-docker/v1.4/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.6/cluster-template/kustomization.yaml similarity index 100% rename from test/e2e/data/infrastructure-docker/v1.4/cluster-template/kustomization.yaml rename to test/e2e/data/infrastructure-docker/v1.6/cluster-template/kustomization.yaml diff --git a/test/e2e/data/infrastructure-docker/v1.4/clusterclass-quick-start.yaml b/test/e2e/data/infrastructure-docker/v1.6/clusterclass-quick-start.yaml similarity index 51% rename from test/e2e/data/infrastructure-docker/v1.4/clusterclass-quick-start.yaml rename to test/e2e/data/infrastructure-docker/v1.6/clusterclass-quick-start.yaml index 5a0c22c59b32..f4a3987dc54d 100644 --- a/test/e2e/data/infrastructure-docker/v1.4/clusterclass-quick-start.yaml +++ b/test/e2e/data/infrastructure-docker/v1.6/clusterclass-quick-start.yaml @@ -42,7 +42,7 @@ spec: ref: apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 kind: KubeadmConfigTemplate - name: quick-start-default-worker-bootstraptemplate + name: quick-start-md-default-worker-bootstraptemplate infrastructure: ref: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 @@ -54,6 +54,24 @@ spec: - type: e2e.remediation.condition status: "False" timeout: 20s + machinePools: + - class: default-worker + template: + metadata: + labels: + ClusterClass.machinePool.label: "ClusterClass.machinePool.labelValue" + annotations: + ClusterClass.machinePool.annotation: "ClusterClass.machinePool.annotationValue" + bootstrap: + ref: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + name: quick-start-mp-default-worker-bootstraptemplate + infrastructure: + ref: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachinePoolTemplate + name: quick-start-default-worker-machinepooltemplate variables: - name: lbImageRepository required: true @@ -100,6 +118,32 @@ spec: openAPIV3Schema: type: boolean default: true + - name: externalCloudProvider + required: false + schema: + openAPIV3Schema: + type: boolean + default: false + - name: ipv6Primary + required: false + schema: + openAPIV3Schema: + type: boolean + default: false + - name: kubeControlPlaneLogLevel + required: false + schema: + openAPIV3Schema: + type: string + description: "Log level for kube-apiserver, kube-scheduler and kube-controller-manager" + example: "2" + - name: kubeletLogLevel + required: false + schema: + openAPIV3Schema: + type: string + description: "Log level for kubelets on control plane and worker nodes" + example: "2" patches: - name: lbImageRepository definitions: @@ -114,44 +158,6 @@ spec: 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: @@ -181,6 +187,46 @@ spec: valueFrom: template: | imageTag: {{ .coreDNSImageTag }} + - name: customImage + description: "Sets the container image that is used for running dockerMachines for the controlPlane and default-worker machineDeployments." + definitions: + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachineTemplate + matchResources: + machineDeploymentClass: + names: + - default-worker + jsonPatches: + - op: add + path: "/spec/template/spec/customImage" + valueFrom: + template: | + kindest/node:{{ .builtin.machineDeployment.version | replace "+" "_" }} + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachineTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/customImage" + valueFrom: + template: | + kindest/node:{{ .builtin.controlPlane.version | replace "+" "_" }} + - selector: + apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 + kind: DockerMachinePoolTemplate + matchResources: + machinePoolClass: + names: + - default-worker + jsonPatches: + - op: add + path: "/spec/template/spec/template/customImage" + valueFrom: + template: | + kindest/node:{{ .builtin.machinePool.version | replace "+" "_" }} - name: preloadImages description: | Sets the container images to preload to the node that is used for running dockerMachines. @@ -200,6 +246,24 @@ spec: path: "/spec/template/spec/preLoadImages" valueFrom: variable: preLoadImages + - name: preloadImagesMP + 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: DockerMachinePoolTemplate + matchResources: + machinePoolClass: + names: + - default-worker + jsonPatches: + - op: add + path: "/spec/template/spec/template/preLoadImages" + valueFrom: + variable: preLoadImages - name: kubeadmControlPlaneMaxSurge description: "Sets the maxSurge value used for rolloutStrategy in the KubeadmControlPlane." enabledIf: '{{ ne .kubeadmControlPlaneMaxSurge "" }}' @@ -229,6 +293,62 @@ spec: - op: add path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/taints" value: [] + - name: controlPlaneExternalCloudProvider + enabledIf: "{{ .externalCloudProvider }}" + description: "Configures kubelet to run with an external cloud provider for control plane nodes." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cloud-provider" + value: "external" + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/cloud-provider" + value: "external" + - name: machineDeploymentExternalCloudProvider + enabledIf: "{{ .externalCloudProvider }}" + description: "Configures kubelet to run with an external cloud provider for machineDeployment nodes." + 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/cloud-provider" + value: "external" + - selector: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + matchResources: + machinePoolClass: + names: + - '*-worker' + jsonPatches: + - op: add + path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/cloud-provider" + value: "external" + - name: localEndpointIPv6 + enabledIf: "{{ .ipv6Primary }}" + description: "Configures KCP to use IPv6 for its localAPIEndpoint." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/localAPIEndpoint" + value: + advertiseAddress: '::' - name: podSecurityStandard description: "Adds an admission configuration for PodSecurity to the kube-apiserver." definitions: @@ -239,9 +359,8 @@ spec: 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" + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/admission-control-config-file" + value: "/etc/kubernetes/kube-apiserver-admission-pss.yaml" - op: add path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraVolumes" value: @@ -275,6 +394,74 @@ spec: namespaces: [kube-system] path: /etc/kubernetes/kube-apiserver-admission-pss.yaml enabledIf: '{{ semverCompare ">= v1.24" .builtin.controlPlane.version }}' + - name: controlPlaneLogLevel + enabledIf: "{{ if .kubeControlPlaneLogLevel }}true{{end}}" + description: "Configures control plane components and kubelet to run at the log level specified in the variable `kubeControlPlaneLogLevel`." + 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/v" + valueFrom: + variable: kubeControlPlaneLogLevel + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/controllerManager/extraArgs/v" + valueFrom: + variable: kubeControlPlaneLogLevel + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/scheduler/extraArgs/v" + valueFrom: + variable: kubeControlPlaneLogLevel + - name: controlPlaneKubeletLogLevel + enabledIf: "{{ if .kubeletLogLevel }}true{{end}}" + description: "Configures control plane kubelets to log at the level set in the variable `kubeletLogLevel`." + definitions: + - selector: + apiVersion: controlplane.cluster.x-k8s.io/v1beta1 + kind: KubeadmControlPlaneTemplate + matchResources: + controlPlane: true + jsonPatches: + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/joinConfiguration/nodeRegistration/kubeletExtraArgs/v" + valueFrom: + variable: kubeletLogLevel + - op: add + path: "/spec/template/spec/kubeadmConfigSpec/initConfiguration/nodeRegistration/kubeletExtraArgs/v" + valueFrom: + variable: kubeletLogLevel + - name: workerKubeletLogLevel + enabledIf: "{{ if .kubeletLogLevel }}true{{end}}" + description: "Configures worker kubelets to log at the level set in the variable `kubeletLogLevel`." + 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/v" + valueFrom: + variable: kubeletLogLevel + - selector: + apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 + kind: KubeadmConfigTemplate + matchResources: + machinePoolClass: + names: + - '*-worker' + jsonPatches: + - op: add + path: "/spec/template/spec/joinConfiguration/nodeRegistration/kubeletExtraArgs/v" + valueFrom: + variable: kubeletLogLevel --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: DockerClusterTemplate @@ -337,25 +524,27 @@ spec: nodeDrainTimeout: 1s kubeadmConfigSpec: clusterConfiguration: + # extraArgs must be non-empty for control plane components to enable patches from ClusterClass to work. controllerManager: - extraArgs: { enable-hostpath-provisioner: 'true' } + extraArgs: + enable-hostpath-provisioner: 'true' + v: "0" + scheduler: + extraArgs: + v: "0" apiServer: + extraArgs: + v: "0" # 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] + certSANs: [localhost, host.docker.internal, "::", "::1", "127.0.0.1", "0.0.0.0"] 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: + nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + kubeletExtraArgs: # having a not empty kubeletExtraArgs is required for the externalCloudProvider patch to work 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: + nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + kubeletExtraArgs: # having a not empty kubeletExtraArgs is required for the externalCloudProvider patch to work eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' - fail-swap-on: "false" --- apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: DockerMachineTemplate @@ -373,8 +562,6 @@ spec: 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" @@ -395,16 +582,35 @@ spec: 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: infrastructure.cluster.x-k8s.io/v1beta1 +kind: DockerMachinePoolTemplate +metadata: + name: quick-start-default-worker-machinepooltemplate + labels: + InfraMachinePoolTemplate.machinePool.label: "InfraMachinePoolTemplate.machinePool.labelValue" + annotations: + InfraMachinePoolTemplate.machinePool.annotation: "InfraMachinePoolTemplate.machinePool.annotationValue" +spec: + template: + metadata: + labels: + InfraMachinePoolTemplate.machinePool.template.label: "InfraMachinePoolTemplate.machinePool.template.labelValue" + annotations: + InfraMachinePoolTemplate.machinePool.template.annotation: "InfraMachinePoolTemplate.machinePool.template.annotationValue" + spec: + template: + 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 + name: quick-start-md-default-worker-bootstraptemplate labels: BootstrapConfigTemplate.machineDeployment.label: "BootstrapConfigTemplate.machineDeployment.labelValue" annotations: @@ -418,10 +624,27 @@ spec: 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: + nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + kubeletExtraArgs: # having a not empty kubeletExtraArgs is required for the externalCloudProvider to work + eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%' +--- +apiVersion: bootstrap.cluster.x-k8s.io/v1beta1 +kind: KubeadmConfigTemplate +metadata: + name: quick-start-mp-default-worker-bootstraptemplate + labels: + BootstrapConfigTemplate.machinePool.label: "BootstrapConfigTemplate.machinePool.labelValue" + annotations: + BootstrapConfigTemplate.machinePool.annotation: "BootstrapConfigTemplate.machinePool.annotationValue" +spec: + template: + metadata: + labels: + BootstrapConfigTemplate.machinePool.template.label: "BootstrapConfigTemplate.machinePool.template.labelValue" + annotations: + BootstrapConfigTemplate.machinePool.template.annotation: "BootstrapConfigTemplate.machinePool.template.annotationValue" + spec: + joinConfiguration: + nodeRegistration: # node registration parameters are automatically injected by CAPD according to the kindest/node image in use. + kubeletExtraArgs: # having a not empty kubeletExtraArgs is required for the externalCloudProvider to work 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 2426ad4d0690..2bcf9273cdad 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: 7 + contract: v1beta1 - major: 1 minor: 6 contract: v1beta1 diff --git a/test/e2e/data/shared/v1.4/metadata.yaml b/test/e2e/data/shared/v1.6/metadata.yaml similarity index 74% rename from test/e2e/data/shared/v1.4/metadata.yaml rename to test/e2e/data/shared/v1.6/metadata.yaml index dc701bf7f62a..2426ad4d0690 100644 --- a/test/e2e/data/shared/v1.4/metadata.yaml +++ b/test/e2e/data/shared/v1.6/metadata.yaml @@ -1,6 +1,12 @@ apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3 kind: Metadata releaseSeries: + - major: 1 + minor: 6 + contract: v1beta1 + - major: 1 + minor: 5 + contract: v1beta1 - major: 1 minor: 4 contract: v1beta1 @@ -18,10 +24,4 @@ releaseSeries: contract: v1beta1 - major: 0 minor: 4 - contract: v1alpha4 - - major: 0 - minor: 3 - contract: v1alpha3 - - major: 0 - minor: 2 - contract: v1alpha2 + contract: v1alpha4 \ No newline at end of file