Skip to content

Commit

Permalink
Address review comments / fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Feb 14, 2024
1 parent fc176cb commit bc778cd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,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 main) ## Generate cluster templates for all versions
generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.0 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
Expand Down
29 changes: 18 additions & 11 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ limitations under the License.
package e2e

import (
"runtime"

. "github.com/onsi/ginkgo/v2"
"k8s.io/utils/pointer"

Expand All @@ -32,6 +34,11 @@ var _ = Describe("When testing clusterctl upgrades (v0.3=>v1.5=>current)", func(
// NOTE: The combination of v0.3=>v1.5=>current allows us to verify this without being forced to upgrade
// the management cluster in the middle of the test as all 3 versions are ~ compatible with the same mgmt and workload Kubernetes versions.
// Additionally, clusterctl v1.5 still allows the upgrade of management clusters from v1alpha3 (v1.6 doesn't).
clusterctlDownloadURL03 := "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.25/clusterctl-{OS}-{ARCH}"
if runtime.GOOS == "darwin" {
// There is no arm64 binary for v0.3.x, so we'll use the amd64 one.
clusterctlDownloadURL03 = "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.25/clusterctl-darwin-amd64"
}
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
return ClusterctlUpgradeSpecInput{
E2EConfig: e2eConfig,
Expand All @@ -41,7 +48,7 @@ var _ = Describe("When testing clusterctl upgrades (v0.3=>v1.5=>current)", func(
SkipCleanup: skipCleanup,
InfrastructureProvider: pointer.String("docker"),
// Configuration for the initial provider deployment.
InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.25/clusterctl-{OS}-{ARCH}",
InitWithBinary: clusterctlDownloadURL03,
// We have to pin the providers because with `InitWithProvidersContract` the test would
// use the latest version for the contract.
InitWithCoreProvider: "cluster-api:v0.3.25",
Expand All @@ -58,11 +65,11 @@ var _ = Describe("When testing clusterctl upgrades (v0.3=>v1.5=>current)", func(
// Upgrade to v1.5.
// Note: v1.5 is the highest version we can use as it's the last one
// that is able to upgrade from a v1alpha3 management cluster.
WithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.5/clusterctl-{OS}-{ARCH}",
CoreProvider: "cluster-api:v1.5.5",
BootstrapProviders: []string{"kubeadm:v1.5.5"},
ControlPlaneProviders: []string{"kubeadm:v1.5.5"},
InfrastructureProviders: []string{"docker:v1.5.5"},
WithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterctl-{OS}-{ARCH}",
CoreProvider: "cluster-api:v1.5.0",
BootstrapProviders: []string{"kubeadm:v1.5.0"},
ControlPlaneProviders: []string{"kubeadm:v1.5.0"},
InfrastructureProviders: []string{"docker:v1.5.0"},
},
{ // Upgrade to latest v1beta1.
Contract: clusterv1.GroupVersion.Version,
Expand Down Expand Up @@ -115,11 +122,11 @@ var _ = Describe("When testing clusterctl upgrades (v0.4=>v1.5=>current)", func(
// Upgrade to v1.5.
// Note: v1.5 is a version we can use as it's
// able to upgrade from a v1alpha4 management cluster (v1.6 would be able to as well)
WithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.5/clusterctl-{OS}-{ARCH}",
CoreProvider: "cluster-api:v1.5.5",
BootstrapProviders: []string{"kubeadm:v1.5.5"},
ControlPlaneProviders: []string{"kubeadm:v1.5.5"},
InfrastructureProviders: []string{"docker:v1.5.5"},
WithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.0/clusterctl-{OS}-{ARCH}",
CoreProvider: "cluster-api:v1.5.0",
BootstrapProviders: []string{"kubeadm:v1.5.0"},
ControlPlaneProviders: []string{"kubeadm:v1.5.0"},
InfrastructureProviders: []string{"docker:v1.5.0"},
},
{ // Upgrade to latest v1beta1.
Contract: clusterv1.GroupVersion.Version,
Expand Down

0 comments on commit bc778cd

Please sign in to comment.