diff --git a/.github/ISSUE_TEMPLATE/kubernetes_bump.md b/.github/ISSUE_TEMPLATE/kubernetes_bump.md index e9a37c8b5481..2ead91b6da7b 100644 --- a/.github/ISSUE_TEMPLATE/kubernetes_bump.md +++ b/.github/ISSUE_TEMPLATE/kubernetes_bump.md @@ -28,7 +28,7 @@ changes should be cherry-picked to all release series that will support the new * Ensure the latest available kind version is used (including the latest images for this kind release) * Verify the quickstart manually * Prior art: #7156 - * bump `InitWithKubernetesVersion` in `clusterctl_upgrade_test.go` + * bump `InitWithKubernetesVersion` and `WorkloadKubernetesVersion` in `clusterctl_upgrade_test.go` * [ ] Ensure the jobs are adjusted to provide test coverage according to our [support policy](https://cluster-api.sigs.k8s.io/reference/versions.html#supported-kubernetes-versions): * For the main branch and the release branch of the latest supported Cluster API minor release: * Add new periodic upgrade job. diff --git a/docs/book/src/developer/providers/migrations/v1.3-to-v1.4.md b/docs/book/src/developer/providers/migrations/v1.3-to-v1.4.md index 6e973232908b..d8cac2e5b45b 100644 --- a/docs/book/src/developer/providers/migrations/v1.3-to-v1.4.md +++ b/docs/book/src/developer/providers/migrations/v1.3-to-v1.4.md @@ -75,7 +75,7 @@ maintainers of providers and consumers of our Go API. For more information, please see: https://github.com/kubernetes/enhancements/issues/2845 - A new `KCPRemediationSpec` test has been added providing better test coverage for KCP remediation most common use cases. As a consequence `MachineRemediationSpec` has been renamed to `MachineDeploymentRemediationSpec` and now only tests remediation of worker machines (NOTE: we plan to improve this test as well in a future iteration). - Package `test/infrastructure/docker/internal/third_party/forked/loadbalancer` has been moved to `test/infrastructure/docker/internal/loadbalancer` to allow it to diverge from the upstream Kind package. -- + ### Suggested changes for providers - Providers should add an explicit security context to their controllers deployment, see [#7831](https://github.com/kubernetes-sigs/cluster-api/pull/7831) for reference. diff --git a/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md b/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md index 906a7fceefb8..fd0d8e014c58 100644 --- a/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md +++ b/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md @@ -30,6 +30,7 @@ maintainers of providers and consumers of our Go API. ### Other - clusterctl move is adding the new annotation `clusterctl.cluster.x-k8s.io/delete-for-move` before object deletion. +- Providers running CAPI release-0.3 clusterctl upgrade tests should set `WorkloadKubernetesVersion` field to the maximum workload cluster kubernetes version supported by the old providers in `ClusterctlUpgradeSpecInput`. For more information, please see: https://github.com/kubernetes-sigs/cluster-api/pull/8518#issuecomment-1508064859 ### Suggested changes for providers diff --git a/docs/release/release-tasks.md b/docs/release/release-tasks.md index 0d65d38f3927..1423d89b0e98 100644 --- a/docs/release/release-tasks.md +++ b/docs/release/release-tasks.md @@ -110,7 +110,7 @@ This comes down to changing occurrences of the old version to the new version, e we use in the clusterctl upgrade tests (as of today `cluster-template` and `cluster-template-topology`). 2. Remove old folders that are not used anymore (for `v1.4` we don't have to remove any). 5. Modify the test specs in `test/e2e/clusterctl_upgrade_test.go` (according to the versions we want to test described above). - Please note that `InitWithKubernetesVersion` should be the highest mgmt cluster version supported by the respective Cluster API version. + Please note that both `InitWithKubernetesVersion` and `WorkloadKubernetesVersion` should be the highest mgmt cluster version supported by the respective Cluster API version. 2. Update `create-local-repository.py` and `tools/tilt-prepare/main.go`: `v1.3.99` => `v1.4.99`. 3. Make sure all tests are green (also run `pull-cluster-api-e2e-full-main` and `pull-cluster-api-e2e-workload-upgrade-1-23-latest-main`). diff --git a/test/e2e/clusterctl_upgrade.go b/test/e2e/clusterctl_upgrade.go index 8ef677152763..d38f2b4ad77f 100644 --- a/test/e2e/clusterctl_upgrade.go +++ b/test/e2e/clusterctl_upgrade.go @@ -105,6 +105,8 @@ type ClusterctlUpgradeSpecInput struct { MgmtFlavor string CNIManifestPath string WorkloadFlavor string + // WorkloadKubernetesVersion is Kubernetes version used to create the workload cluster, e.g. `v1.25.0` + WorkloadKubernetesVersion string // Custom providers can be specified to upgrade to a pre-release or a custom version instead of upgrading to the latest using contact CoreProvider string BootstrapProviders []string @@ -328,7 +330,10 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg // so we are getting a template using the downloaded version of clusterctl, applying it, and wait for machines to be provisioned. workLoadClusterName = fmt.Sprintf("%s-%s", specName, util.RandomString(6)) - kubernetesVersion := input.E2EConfig.GetVariable(KubernetesVersion) + kubernetesVersion := input.WorkloadKubernetesVersion + if kubernetesVersion == "" { + kubernetesVersion = input.E2EConfig.GetVariable(KubernetesVersion) + } controlPlaneMachineCount := pointer.Int64(1) workerMachineCount := pointer.Int64(1) diff --git a/test/e2e/clusterctl_upgrade_test.go b/test/e2e/clusterctl_upgrade_test.go index 2f89c5d07703..cfecc089ee95 100644 --- a/test/e2e/clusterctl_upgrade_test.go +++ b/test/e2e/clusterctl_upgrade_test.go @@ -36,7 +36,8 @@ var _ = Describe("When testing clusterctl upgrades (v0.3=>current)", func() { InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.25/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1alpha3", // CAPI v0.3.x does not work on Kubernetes >= v1.22. - InitWithKubernetesVersion: "v1.21.12", + InitWithKubernetesVersion: "v1.21.14", + WorkloadKubernetesVersion: "v1.22.17", // CAPI does not work with Kubernetes < v1.22 if ClusterClass is enabled, so we have to disable it. UpgradeClusterctlVariables: map[string]string{ "CLUSTER_TOPOLOGY": "false", @@ -68,7 +69,8 @@ var _ = Describe("When testing clusterctl upgrades (v0.4=>current)", func() { SkipCleanup: skipCleanup, InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1alpha4", - InitWithKubernetesVersion: "v1.23.13", + InitWithKubernetesVersion: "v1.23.17", + WorkloadKubernetesVersion: "v1.23.17", MgmtFlavor: "topology", WorkloadFlavor: "", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -105,7 +107,8 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() { // 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{}, - InitWithKubernetesVersion: "v1.23.13", + InitWithKubernetesVersion: "v1.23.17", + WorkloadKubernetesVersion: "v1.23.17", MgmtFlavor: "topology", WorkloadFlavor: "", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -143,7 +146,8 @@ var _ = Describe("When testing clusterctl upgrades (v1.3=>current)", func() { // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, InitWithProvidersContract: "v1beta1", - InitWithKubernetesVersion: "v1.26.0", + InitWithKubernetesVersion: "v1.26.3", + WorkloadKubernetesVersion: "v1.26.3", MgmtFlavor: "topology", WorkloadFlavor: "", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -181,7 +185,8 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.3=>cur // try to deploy the latest version of our test-extension from docker.yaml. InitWithRuntimeExtensionProviders: []string{}, InitWithProvidersContract: "v1beta1", - InitWithKubernetesVersion: "v1.26.0", + InitWithKubernetesVersion: "v1.26.3", + WorkloadKubernetesVersion: "v1.26.3", MgmtFlavor: "topology", WorkloadFlavor: "topology", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -210,6 +215,7 @@ var _ = Describe("When testing clusterctl upgrades (v1.4=>current)", func() { InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1beta1", InitWithKubernetesVersion: "v1.27.0", + WorkloadKubernetesVersion: "v1.27.0", MgmtFlavor: "topology", WorkloadFlavor: "", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade. @@ -238,6 +244,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.4=>cur InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.0/clusterctl-{OS}-{ARCH}", InitWithProvidersContract: "v1beta1", InitWithKubernetesVersion: "v1.27.0", + WorkloadKubernetesVersion: "v1.27.0", MgmtFlavor: "topology", WorkloadFlavor: "topology", // This check ensures that ownerReference apiVersions are updated for all types after the upgrade.