diff --git a/Makefile b/Makefile
index ea4f170f15d6..6a39e3431c5d 100644
--- a/Makefile
+++ b/Makefile
@@ -556,7 +556,7 @@ generate-doctoc:
TRACE=$(TRACE) ./hack/generate-doctoc.sh
.PHONY: generate-e2e-templates
-generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.0 v1.5 v1.6 v1.8 v1.9 main) ## Generate cluster templates for all versions
+generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.5 v1.6 v1.8 v1.9 main) ## Generate cluster templates for all versions
DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker
INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory
@@ -569,10 +569,6 @@ generate-e2e-templates-v0.3: $(KUSTOMIZE)
generate-e2e-templates-v0.4: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v0.4/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v0.4/cluster-template.yaml
-.PHONY: generate-e2e-templates-v1.0
-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.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
diff --git a/docs/book/src/clusterctl/commands/upgrade.md b/docs/book/src/clusterctl/commands/upgrade.md
index 9d53d98c4ae7..20466ba75854 100644
--- a/docs/book/src/clusterctl/commands/upgrade.md
+++ b/docs/book/src/clusterctl/commands/upgrade.md
@@ -80,18 +80,15 @@ clusterctl upgrade apply \
Clusterctl upgrade test coverage
Cluster API only tests a subset of possible clusterctl upgrade paths as otherwise the test matrix would be overwhelming.
-Untested upgrade paths are not blocked by clusterctl and should work in general, they are just not tested. Users
-intending to use an upgrade path not tested by us should do their own validation to ensure the operation works correctly.
+Untested upgrade paths are not blocked by clusterctl and should work in general, but users
+intending to perform an upgrade path not tested by us should do their own validation to ensure the operation works correctly.
The following is an example of the tested upgrade paths for v1.7:
-| From | To | Note |
-|------|------|------------------------------------------------------|
-| v1.0 | v1.7 | v1.0 is the first release with the v1beta1 contract. |
-| v1.5 | v1.7 | v1.5 is v1.7 - 2. |
-| v1.6 | v1.7 | v1.6 is v1.7 - 1. |
-
-The idea is to always test upgrade from v1.0 and the previous two minor releases.
+| From | To | Note |
+|------|------|------------------------------|
+| v1.5 | v1.7 | n-2 --> n (v1.5 is v1.7 - 2) |
+| v1.6 | v1.7 | n-1 --> n (v1.6 is v1.7 - 1) |
diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go
index 14746c1ec4c8..771e8e9a8597 100644
--- a/test/e2e/clusterctl_upgrade_test.go
+++ b/test/e2e/clusterctl_upgrade_test.go
@@ -182,42 +182,6 @@ var _ = Describe("When testing clusterctl upgrades (v0.4=>v1.6=>current)", func(
})
})
-// Note: This test should not be changed during "prepare main branch".
-var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
- // Get v1.0 latest stable release
- version := "1.0"
- stableRelease, err := GetStableReleaseOfMinor(ctx, version)
- Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
- ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
- return ClusterctlUpgradeSpecInput{
- E2EConfig: e2eConfig,
- ClusterctlConfigPath: clusterctlConfigPath,
- BootstrapClusterProxy: bootstrapClusterProxy,
- ArtifactFolder: artifactFolder,
- SkipCleanup: skipCleanup,
- 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.3.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)},
- // We have to set this to an empty array as clusterctl v1.0 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{},
- // 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",
- WorkloadFlavor: "",
- UseKindForManagementCluster: true,
- }
- })
-})
-
// Note: This test should be changed during "prepare main branch", it should test n-2 => current.
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.8=>current) [ClusterClass]", Label("ClusterClass"), func() {
// Get n-2 latest stable release
diff --git a/test/e2e/config/docker.yaml b/test/e2e/config/docker.yaml
index 5f01e00e5f5d..7591ed29a709 100644
--- a/test/e2e/config/docker.yaml
+++ b/test/e2e/config/docker.yaml
@@ -53,15 +53,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- - name: "{go://sigs.k8s.io/cluster-api@v1.0}"
- value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.0}/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.0/metadata.yaml"
- name: "{go://sigs.k8s.io/cluster-api@v1.5}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.5}/core-components.yaml"
type: "url"
@@ -124,15 +115,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- - name: "{go://sigs.k8s.io/cluster-api@v1.0}"
- value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.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.0/metadata.yaml"
- name: "{go://sigs.k8s.io/cluster-api@v1.5}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.5}/bootstrap-components.yaml"
type: "url"
@@ -195,15 +177,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- - name: "{go://sigs.k8s.io/cluster-api@v1.0}"
- value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.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.0/metadata.yaml"
- name: "{go://sigs.k8s.io/cluster-api@v1.5}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.5}/control-plane-components.yaml"
type: "url"
@@ -268,16 +241,6 @@ providers:
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- sourcePath: "../data/infrastructure-docker/v0.4/cluster-template.yaml"
- - name: "{go://sigs.k8s.io/cluster-api@v1.0}"
- value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.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.0/metadata.yaml"
- - sourcePath: "../data/infrastructure-docker/v1.0/cluster-template.yaml"
- name: "{go://sigs.k8s.io/cluster-api@v1.5}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/cluster-api@v1.5}/infrastructure-components-development.yaml"
type: "url"
diff --git a/test/e2e/data/infrastructure-docker/v1.0/bases/cluster-with-kcp.yaml b/test/e2e/data/infrastructure-docker/v1.0/bases/cluster-with-kcp.yaml
deleted file mode 100644
index 4238ede6fdff..000000000000
--- a/test/e2e/data/infrastructure-docker/v1.0/bases/cluster-with-kcp.yaml
+++ /dev/null
@@ -1,103 +0,0 @@
----
-# 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:
- # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here.
- customImage: "kindest/node:v1.23.17@sha256:f77f8cf0b30430ca4128cc7cfafece0c274a118cd0cdb251049664ace0dee4ff"
- extraMounts:
- - containerPath: "/var/run/docker.sock"
- hostPath: "/var/run/docker.sock"
----
-# 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:
- 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:
- criSocket: unix:///var/run/containerd/containerd.sock
- kubeletExtraArgs:
- # 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.
- # This cluster is used in tests where the Kubernetes version is < 1.24
- cgroup-driver: cgroupfs
- eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'
- fail-swap-on: "false"
- joinConfiguration:
- nodeRegistration:
- criSocket: unix:///var/run/containerd/containerd.sock
- kubeletExtraArgs:
- # 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.
- # This cluster is used in tests where the Kubernetes version is < 1.24
- cgroup-driver: cgroupfs
- eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'
- fail-swap-on: "false"
- version: "${KUBERNETES_VERSION}"
diff --git a/test/e2e/data/infrastructure-docker/v1.0/bases/crs.yaml b/test/e2e/data/infrastructure-docker/v1.0/bases/crs.yaml
deleted file mode 100644
index b1b61237dc62..000000000000
--- a/test/e2e/data/infrastructure-docker/v1.0/bases/crs.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-# 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.0/bases/md.yaml b/test/e2e/data/infrastructure-docker/v1.0/bases/md.yaml
deleted file mode 100644
index bb5c33a0f4ae..000000000000
--- a/test/e2e/data/infrastructure-docker/v1.0/bases/md.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-# 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:
- # NOTE: If the Kubernetes version is changed in `clusterctl_upgrade_test.go` the image and SHA must be updated here.
- customImage: "kindest/node:v1.23.17@sha256:f77f8cf0b30430ca4128cc7cfafece0c274a118cd0cdb251049664ace0dee4ff"
- extraMounts:
- - containerPath: "/var/run/docker.sock"
- hostPath: "/var/run/docker.sock"
----
-# 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:
- criSocket: unix:///var/run/containerd/containerd.sock
- kubeletExtraArgs:
- # 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.
- # This cluster is used in tests where the Kubernetes version is < 1.24
- cgroup-driver: cgroupfs
- eviction-hard: 'nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%'
- fail-swap-on: "false"
----
-# 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.0/cluster-template/kustomization.yaml b/test/e2e/data/infrastructure-docker/v1.0/cluster-template/kustomization.yaml
deleted file mode 100644
index 825df00723f8..000000000000
--- a/test/e2e/data/infrastructure-docker/v1.0/cluster-template/kustomization.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-resources:
-- ../bases/cluster-with-kcp.yaml
-- ../bases/md.yaml
-- ../bases/crs.yaml