Skip to content

Commit

Permalink
Add clusterctl upgrade test
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <[email protected]>
  • Loading branch information
killianmuldoon committed Sep 29, 2023
1 parent e77d02c commit 7457be8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
55 changes: 55 additions & 0 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Copyright 2021 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package e2e

import (
"context"

. "github.com/onsi/ginkgo/v2"
capi_e2e "sigs.k8s.io/cluster-api/test/e2e"
)

var _ = Describe("ClusterAPI Upgrade Tests [PR-Blocking]", func() {
Describe("Upgrading cluster from v1alpha4 to v1beta1 using clusterctl", func() {
capi_e2e.ClusterctlUpgradeSpec(context.TODO(), func() capi_e2e.ClusterctlUpgradeSpecInput {
return capi_e2e.ClusterctlUpgradeSpecInput{
E2EConfig: e2eConfig,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapClusterProxy: bootstrapClusterProxy,
ArtifactFolder: artifactFolder,
SkipCleanup: skipCleanup,
InitWithProvidersContract: "v1beta1",
MgmtFlavor: "remote-management",
InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.7/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.3.X for v1beta1).
InitWithCoreProvider: "cluster-api:v1.4.7",
InitWithBootstrapProviders: []string{"kubeadm:v1.4.7"},
InitWithControlPlaneProviders: []string{"kubeadm:v1.4.7"},
InitWithInfrastructureProviders: []string{"docker:v1.7.2"},
// 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.
InitWithKubernetesVersion: "v1.23.17",
WorkloadKubernetesVersion: "v1.23.17",
WorkloadFlavor: "",
}
})
})
})
1 change: 1 addition & 0 deletions test/e2e/config/vsphere-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ variables:
VENDOR_ID: 4318
# CAPV feature flags
EXP_NODE_ANTI_AFFINITY: "true"
INIT_WITH_BINARY: ""

intervals:
default/wait-controllers: ["5m", "10s"]
Expand Down

0 comments on commit 7457be8

Please sign in to comment.