You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/e2e/clusterctl_upgrade.go
+35-5Lines changed: 35 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -53,11 +53,15 @@ const (
53
53
54
54
// ClusterctlUpgradeSpecInput is the input for ClusterctlUpgradeSpec.
55
55
typeClusterctlUpgradeSpecInputstruct {
56
-
E2EConfig*clusterctl.E2EConfig
57
-
ClusterctlConfigPathstring
58
-
BootstrapClusterProxy framework.ClusterProxy
59
-
ArtifactFolderstring
60
-
InitWithBinarystring
56
+
E2EConfig*clusterctl.E2EConfig
57
+
ClusterctlConfigPathstring
58
+
BootstrapClusterProxy framework.ClusterProxy
59
+
ArtifactFolderstring
60
+
// InitWithBinary can be used to override the INIT_WITH_BINARY e2e config variable with the URL of the clusterctl binary of the old version of Cluster API. The spec will interpolate the
61
+
// strings `{OS}` and `{ARCH}` to `runtime.GOOS` and `runtime.GOARCH` respectively, e.g. https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.23/clusterctl-{OS}-{ARCH}
62
+
InitWithBinarystring
63
+
// InitWithProvidersContract can be used to override the INIT_WITH_PROVIDERS_CONTRACT e2e config variable with a specific
64
+
// provider contract to use to initialise the secondary management cluster, e.g. `v1alpha3`
@@ -69,6 +73,32 @@ type ClusterctlUpgradeSpecInput struct {
69
73
// ClusterctlUpgradeSpec implements a test that verifies clusterctl upgrade of a management cluster.
70
74
//
71
75
// NOTE: this test is designed to test older versions of Cluster API --> v1beta1 upgrades.
76
+
// This spec will create a workload cluster, which will be converted into a new management cluster (henceforth called secondary
77
+
// managemnet cluster)
78
+
// with the older version of Cluster API and infrastructure provider. It will then create an additional
79
+
// workload cluster (henceforth called secondary workload cluster) from the new management cluster using the default cluster template of the old release
80
+
// then run clusterctl upgrade to the latest version of Cluster API and ensure correct operation by
81
+
// scaling a MachineDeployment.
82
+
//
83
+
// To use this spec the variables INIT_WITH_BINARY and INIT_WITH_PROVIDERS_CONTRACT must be set or specified directly
84
+
// in the spec input. See ClusterctlUpgradeSpecInput for further information.
85
+
//
86
+
// In order to get this to work, infrastructure providers need to implement a mechanism to stage
87
+
// the locally compiled OCI image of their infrastructure provider and have it downloaded and available
88
+
// on the secondary management cluster. It is recommended that infrastructure providers use `docker save` and output
89
+
// the local image to a tar file, upload it to object storage, and then use preKubeadmCommands to pre-load the image
90
+
// before Kubernetes starts.
91
+
//
92
+
// For example, for Cluster API Provider AWS, the docker image is stored in an s3 bucket with a unique name for the
93
+
// account-region pair, so as to not clash with any other AWS user / account, with the object key being the sha256sum of the
94
+
// image digest.
95
+
//
96
+
// The following commands are then added to preKubeadmCommands:
0 commit comments