Skip to content

Commit

Permalink
Drop 1.0->current upgrade test
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Jan 24, 2025
1 parent c0cf7c6 commit 0f27908
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 276 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 6 additions & 9 deletions docs/book/src/clusterctl/commands/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,15 @@ clusterctl upgrade apply \
<h1>Clusterctl upgrade test coverage</h1>

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) |

</aside>

Expand Down
36 changes: 0 additions & 36 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 0 additions & 37 deletions test/e2e/config/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/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/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/core-components.yaml"
type: "url"
Expand Down Expand Up @@ -124,15 +115,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/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/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/bootstrap-components.yaml"
type: "url"
Expand Down Expand Up @@ -195,15 +177,6 @@ providers:
new: --metrics-addr=:8080
files:
- sourcePath: "../data/shared/v0.4/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/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/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/control-plane-components.yaml"
type: "url"
Expand Down Expand Up @@ -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/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/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/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/{go://sigs.k8s.io/[email protected]}/infrastructure-components-development.yaml"
type: "url"
Expand Down
103 changes: 0 additions & 103 deletions test/e2e/data/infrastructure-docker/v1.0/bases/cluster-with-kcp.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions test/e2e/data/infrastructure-docker/v1.0/bases/crs.yaml

This file was deleted.

58 changes: 0 additions & 58 deletions test/e2e/data/infrastructure-docker/v1.0/bases/md.yaml

This file was deleted.

This file was deleted.

0 comments on commit 0f27908

Please sign in to comment.