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: docs/book/src/developer/providers/migrations/v1.7-to-v1.8.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,10 @@ maintainers of providers and consumers of our Go API.
17
17
18
18
### Other
19
19
20
+
- The support for INIT env variables was dropped in the clusterctl upgrade tests. If you were using `INIT_WITH_BINARY`,
21
+
`INIT_WITH_PROVIDERS_CONTRACT` or `INIT_WITH_KUBERNETES_VERSION` consider using the corresponding fields in `ClusterctlUpgradeSpecInput`.
22
+
If you prefer to use environment variables, read them e.g. via `os.Getenv` and then set the spec fields accordingly.
23
+
20
24
### Suggested changes for providers
21
25
22
26
- From Cluster API v1.7 the manager pods are created with `terminationMessagePolicy` set to `FallbackToLogsOnError` for the manager container. This offers the chance that the pod's termination message will contain something useful if the manager exits unexpectedly, which in turn makes debugging easier. We also recommend this setting to provider managers. For an example, see the corresponding change in [CAPV](https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/pull/2988) or [CAPO](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/2070).
// ClusterctlUpgradeSpecInput is the input for ClusterctlUpgradeSpec.
65
59
typeClusterctlUpgradeSpecInputstruct {
66
60
E2EConfig*clusterctl.E2EConfig
67
61
ClusterctlConfigPathstring
68
62
BootstrapClusterProxy framework.ClusterProxy
69
63
ArtifactFolderstring
70
-
// 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
64
+
// InitWithBinary must be used to specify the URL of the clusterctl binary of the old version of Cluster API. The spec will interpolate the
71
65
// 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}
72
66
InitWithBinarystring
73
-
// InitWithProvidersContract can be used to override the INIT_WITH_PROVIDERS_CONTRACT e2e config variable with a specific
74
-
// provider contract to use to initialise the secondary management cluster, e.g. `v1alpha3`
67
+
// InitWithProvidersContract can be used to set the contract used to initialise the secondary management cluster, e.g. `v1alpha3`
75
68
InitWithProvidersContractstring
76
-
// InitWithKubernetesVersion can be used to override the INIT_WITH_KUBERNETES_VERSION e2e config variable with a specific
77
-
// Kubernetes version to use to create the secondary management cluster, e.g. `v1.25.0`
69
+
// InitWithKubernetesVersion must be used to set a Kubernetes version to use to create the secondary management cluster, e.g. `v1.25.0`
78
70
InitWithKubernetesVersionstring
79
71
// InitWithCoreProvider specifies the core provider version to use when initializing the secondary management cluster, e.g. `cluster-api:v1.3.0`.
80
72
// If not set, the core provider version is calculated based on the contract.
@@ -164,7 +156,7 @@ type ClusterctlUpgradeSpecInputUpgrade struct {
164
156
// then run clusterctl upgrade to the latest version of Cluster API and ensure correct operation by
165
157
// scaling a MachineDeployment.
166
158
//
167
-
// To use this spec the variables INIT_WITH_BINARY and INIT_WITH_PROVIDERS_CONTRACT must be set or specified directly
159
+
// To use this spec the fields InitWithBinary and InitWithKubernetesVersion must be specified
168
160
// in the spec input. See ClusterctlUpgradeSpecInput for further information.
169
161
//
170
162
// In order to get this to work, infrastructure providers need to implement a mechanism to stage
Expect(input.E2EConfig).ToNot(BeNil(), "Invalid argument. input.E2EConfig can't be nil when calling %s spec", specName)
211
203
Expect(input.ClusterctlConfigPath).To(BeAnExistingFile(), "Invalid argument. input.ClusterctlConfigPath must be an existing file when calling %s spec", specName)
212
204
Expect(input.BootstrapClusterProxy).ToNot(BeNil(), "Invalid argument. input.BootstrapClusterProxy can't be nil when calling %s spec", specName)
205
+
Expect(input.InitWithBinary).ToNot(BeEmpty(), "Invalid argument. input.InitWithBinary can't be empty when calling %s spec", specName)
206
+
Expect(input.InitWithKubernetesVersion).ToNot(BeEmpty(), "Invalid argument. input.InitWithKubernetesVersion can't be empty when calling %s spec", specName)
213
207
214
208
clusterctlBinaryURLTemplate:=input.InitWithBinary
215
-
ifclusterctlBinaryURLTemplate=="" {
216
-
Expect(input.E2EConfig.ResolveReleases(ctx)).To(Succeed(), "Failed to resolve release markers in e2e test config file")
217
-
Expect(input.E2EConfig.Variables).To(HaveKey(initWithBinaryVariableName), "Invalid argument. %s variable must be defined when calling %s spec", initWithBinaryVariableName, specName)
218
-
Expect(input.E2EConfig.Variables[initWithBinaryVariableName]).ToNot(BeEmpty(), "Invalid argument. %s variable can't be empty when calling %s spec", initWithBinaryVariableName, specName)
Expect(input.E2EConfig.Variables).To(HaveKey(initWithKubernetesVersion), "Invalid argument. %s variable must be defined when calling %s spec", initWithKubernetesVersion, specName)
238
-
Expect(input.E2EConfig.Variables[initWithKubernetesVersion]).ToNot(BeEmpty(), "Invalid argument. %s variable can't be empty when calling %s spec", initWithKubernetesVersion, specName)
0 commit comments