Skip to content

Commit

Permalink
🌱 Prepare main branch for v1.13 development (#3321)
Browse files Browse the repository at this point in the history
* Prepare main branch for v1.13 development

* Add clusterclass kustomization for v1.11

* Bump runtime extension providers

* Fix CAPV n-1 version
  • Loading branch information
fabriziopandini authored Jan 10, 2025
1 parent 598ef6f commit 528b282
Show file tree
Hide file tree
Showing 42 changed files with 927 additions and 516 deletions.
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ generate-doctoc:
TRACE=$(TRACE) ./hack/generate-doctoc.sh

.PHONY: generate-e2e-templates
generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.9 v1.10 v1.11 main) ## Generate test templates for all branches
generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v1.10 v1.11 v1.12 main) ## Generate test templates for all branches

.PHONY: generate-e2e-templates-main
generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the main branch
Expand Down Expand Up @@ -413,6 +413,14 @@ generate-e2e-templates-main: $(KUSTOMIZE) ## Generate test templates for the mai
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/fast-rollout" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-fast-rollout-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/ownerrefs-finalizers" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/main/cluster-template-ownerrefs-finalizers-supervisor.yaml"

.PHONY: generate-e2e-templates-v1.12
generate-e2e-templates-v1.12: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.12/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.12/clusterclass-quick-start.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.12/workload" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.12/cluster-template-workload.yaml"

"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.12/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.12/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.12/workload" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.12/cluster-template-workload-supervisor.yaml"

.PHONY: generate-e2e-templates-v1.11
generate-e2e-templates-v1.11: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.11/clusterclass-quick-start.yaml"
Expand All @@ -421,7 +429,6 @@ generate-e2e-templates-v1.11: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/workload" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.11/cluster-template-workload-supervisor.yaml"


.PHONY: generate-e2e-templates-v1.10
generate-e2e-templates-v1.10: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.10/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.10/clusterclass-quick-start.yaml"
Expand All @@ -430,14 +437,6 @@ generate-e2e-templates-v1.10: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.10/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.10/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.10/workload" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.10/cluster-template-workload-supervisor.yaml"

.PHONY: generate-e2e-templates-v1.9
generate-e2e-templates-v1.9: $(KUSTOMIZE)
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.9/clusterclass" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.9/clusterclass-quick-start.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.9/workload" > "$(E2E_GOVMOMI_TEMPLATE_DIR)/v1.9/cluster-template-workload.yaml"

"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.9/clusterclass" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.9/clusterclass-quick-start-supervisor.yaml"
"$(KUSTOMIZE)" --load-restrictor LoadRestrictionsNone build "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.9/workload" > "$(E2E_SUPERVISOR_TEMPLATE_DIR)/v1.9/cluster-template-workload-supervisor.yaml"

.PHONY: generate-test-infra-prowjobs
generate-test-infra-prowjobs: $(PROWJOB_GEN) ## Generates the prowjob configurations in test-infra
@if [ -z "${TEST_INFRA_DIR}" ]; then echo "TEST_INFRA_DIR is not set"; exit 1; fi
Expand Down
2 changes: 1 addition & 1 deletion clusterctl-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "infrastructure-vsphere",
"config": {
"componentsFile": "infrastructure-components.yaml",
"nextVersion": "v1.12.99"
"nextVersion": "v1.13.99"
}
}
3 changes: 3 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ releaseSeries:
- major: 1
minor: 12
contract: v1beta1
- major: 1
minor: 13
contract: v1beta1
46 changes: 23 additions & 23 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ var (
)

// Note: This test should be changed during "prepare main branch", it should test CAPV n-1 => current (and then corresponding CAPI versions if already available).
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11=>current, CAPI 1.8=>1.9) on K8S latest ci mgmt cluster [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.11-current-latest-ci" // prefix (clusterctl-upgrade) copied from CAPI
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.12=>current, CAPI 1.9=>1.10) on K8S latest ci mgmt cluster [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.12-current-latest-ci" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificSettingsGetter func() testSettings) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
capiVersion := "1.8"
capiVersion := "1.9"
capiStableRelease, err := getStableReleaseOfMinor(ctx, capiReleaseMarkerPrefix, capiVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capiVersion)
capvVersion := "1.11"
capvVersion := "1.12"
capvStableRelease, err := getStableReleaseOfMinor(ctx, capvReleaseMarkerPrefix, capvVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capvVersion)
initKubernetesVersion, err := kubernetesversions.ResolveVersion(ctx, e2eConfig.GetVariable("KUBERNETES_VERSION_LATEST_CI"))
Expand All @@ -71,7 +71,7 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11
// This is to guarantee that both, the old and new CAPI version, support the defined version.
// Ensure all Kubernetes versions used here are covered in patch-vsphere-template.yaml
InitWithKubernetesVersion: initKubernetesVersion,
WorkloadKubernetesVersion: "v1.31.0",
WorkloadKubernetesVersion: "v1.32.0",
WorkloadFlavor: testSpecificSettingsGetter().FlavorForMode("workload"),
// We are using a separate management cluster. For running in VCSim we also have to pass WithAdditionalVCSimServer
// below otherwise there will be no VCSim instance created in the management cluster.
Expand All @@ -87,14 +87,14 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11
})

// Note: This test should be changed during "prepare main branch", it should test CAPV n-1 => current (and then corresponding CAPI versions if already available).
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11=>current, CAPI 1.8=>1.9) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.11-current" // prefix (clusterctl-upgrade) copied from CAPI
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.12=>current, CAPI 1.9=>1.10) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.12-current" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificSettingsGetter func() testSettings) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
capiVersion := "1.8"
capiVersion := "1.9"
capiStableRelease, err := getStableReleaseOfMinor(ctx, capiReleaseMarkerPrefix, capiVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capiVersion)
capvVersion := "1.11"
capvVersion := "1.12"
capvStableRelease, err := getStableReleaseOfMinor(ctx, capvReleaseMarkerPrefix, capvVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capvVersion)
return capi_e2e.ClusterctlUpgradeSpecInput{
Expand All @@ -115,8 +115,8 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11
// InitWithKubernetesVersion should be the highest kubernetes version supported by the init Cluster API version.
// This is to guarantee that both, the old and new CAPI version, support the defined version.
// Ensure all Kubernetes versions used here are covered in patch-vsphere-template.yaml
InitWithKubernetesVersion: "v1.31.0",
WorkloadKubernetesVersion: "v1.31.0",
InitWithKubernetesVersion: "v1.32.0",
WorkloadKubernetesVersion: "v1.32.0",
WorkloadFlavor: testSpecificSettingsGetter().FlavorForMode("workload"),
// We are using a separate management cluster. For running in VCSim we also have to pass WithAdditionalVCSimServer
// below otherwise there will be no VCSim instance created in the management cluster.
Expand All @@ -132,14 +132,14 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11
})

// Note: This test should be changed during "prepare main branch", it should test CAPV n-2 => current (and then corresponding CAPI versions if already available).
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.10=>current, CAPI 1.7=>1.9) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.10-current" // prefix (clusterctl-upgrade) copied from CAPI
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.11=>current, CAPI 1.8=>1.10) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.11-current" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificSettingsGetter func() testSettings) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
capiVersion := "1.7"
capiVersion := "1.8"
capiStableRelease, err := getStableReleaseOfMinor(ctx, capiReleaseMarkerPrefix, capiVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capiVersion)
capvVersion := "1.10"
capvVersion := "1.11"
capvStableRelease, err := getStableReleaseOfMinor(ctx, capvReleaseMarkerPrefix, capvVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capvVersion)
return capi_e2e.ClusterctlUpgradeSpecInput{
Expand All @@ -160,8 +160,8 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.10
// InitWithKubernetesVersion should be the highest kubernetes version supported by the init Cluster API version.
// This is to guarantee that both, the old and new CAPI version, support the defined version.
// Ensure all Kubernetes versions used here are covered in patch-vsphere-template.yaml
InitWithKubernetesVersion: "v1.30.0",
WorkloadKubernetesVersion: "v1.30.0",
InitWithKubernetesVersion: "v1.31.0",
WorkloadKubernetesVersion: "v1.31.0",
WorkloadFlavor: testSpecificSettingsGetter().FlavorForMode("workload"),
// We are using a separate management cluster. For running in VCSim we also have to pass WithAdditionalVCSimServer
// below otherwise there will be no VCSim instance created in the management cluster.
Expand All @@ -177,14 +177,14 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.10
})

// Note: This test should be changed during "prepare main branch", it should test CAPV n-3 => current (and then corresponding CAPI versions if already available).
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.9=>current, CAPI 1.6=>1.9) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.9-current" // prefix (clusterctl-upgrade) copied from CAPI
var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.10=>current, CAPI 1.7=>1.10) [vcsim] [supervisor] [ClusterClass]", func() {
const specName = "clusterctl-upgrade-1.10-current" // prefix (clusterctl-upgrade) copied from CAPI
Setup(specName, func(testSpecificSettingsGetter func() testSettings) {
capi_e2e.ClusterctlUpgradeSpec(ctx, func() capi_e2e.ClusterctlUpgradeSpecInput {
capiVersion := "1.6"
capiVersion := "1.7"
capiStableRelease, err := getStableReleaseOfMinor(ctx, capiReleaseMarkerPrefix, capiVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capiVersion)
capvVersion := "1.9"
capvVersion := "1.10"
capvStableRelease, err := getStableReleaseOfMinor(ctx, capvReleaseMarkerPrefix, capvVersion)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", capvVersion)
return capi_e2e.ClusterctlUpgradeSpecInput{
Expand All @@ -205,8 +205,8 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (CAPV 1.9=
// InitWithKubernetesVersion should be the highest kubernetes version supported by the init Cluster API version.
// This is to guarantee that both, the old and new CAPI version, support the defined version.
// Ensure all Kubernetes versions used here are covered in patch-vsphere-template.yaml
InitWithKubernetesVersion: "v1.29.0",
WorkloadKubernetesVersion: "v1.29.0",
InitWithKubernetesVersion: "v1.30.0",
WorkloadKubernetesVersion: "v1.30.0",
WorkloadFlavor: testSpecificSettingsGetter().FlavorForMode("workload"),
// We are using a separate management cluster. For running in VCSim we also have to pass WithAdditionalVCSimServer
// below otherwise there will be no VCSim instance created in the management cluster.
Expand Down
36 changes: 16 additions & 20 deletions test/e2e/config/vsphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,11 @@ providers:
- name: vsphere
type: InfrastructureProvider
versions:
- name: v1.12.99 # next release
- name: v1.13.99 # next release
# Use manifest from source files
value: ../../../../cluster-api-provider-vsphere/config/default
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-conformance.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-dhcp-overrides.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/main/cluster-template-hw-upgrade.yaml"
Expand Down Expand Up @@ -193,44 +192,41 @@ providers:
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-conformance-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/main/cluster-template-ownerrefs-finalizers-supervisor.yaml"
- sourcePath: "../data/shared/capv/main/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}" # supported release in the v1beta1 series
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{go://sigs.k8s.io/[email protected]}/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.12/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.12/clusterclass-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.12/cluster-template-workload-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.12/clusterclass-quick-start-supervisor.yaml"
- sourcePath: "../data/shared/capv/v1.12/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{go://sigs.k8s.io/[email protected]}/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.11/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.11/clusterclass-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.11/cluster-template-workload-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.11/clusterclass-quick-start-supervisor.yaml"
- sourcePath: "../data/shared/capv/v1.11/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}" # supported release in the v1beta1 series
- name: "{go://sigs.k8s.io/[email protected]}"
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{go://sigs.k8s.io/[email protected]}/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.10/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.10/clusterclass-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.10/cluster-template-workload-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.10/clusterclass-quick-start-supervisor.yaml"
- sourcePath: "../data/shared/capv/v1.10/metadata.yaml"
- name: "{go://sigs.k8s.io/[email protected]}" # supported release in the v1beta1 series
value: "https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/releases/download/{go://sigs.k8s.io/[email protected]}/infrastructure-components.yaml"
type: "url"
contract: v1beta1
files:
# Add a cluster template
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.9/cluster-template-workload.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-govmomi/v1.9/clusterclass-quick-start.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.9/cluster-template-workload-supervisor.yaml"
- sourcePath: "../../../test/e2e/data/infrastructure-vsphere-supervisor/v1.9/clusterclass-quick-start-supervisor.yaml"
- sourcePath: "../data/shared/capv/v1.9/metadata.yaml"

- name: vcsim
type: RuntimeExtensionProvider # vcsim isn't a provider, but we fake it is so it can be handled by the clusterctl machinery.
versions:
- name: v1.12.99
- name: v1.13.99
# Use manifest from source files
value: ../../../../cluster-api-provider-vsphere/test/infrastructure/vcsim/config/default
contract: v1beta1
Expand All @@ -255,7 +251,7 @@ providers:
- name: net-operator
type: RuntimeExtensionProvider # net-operator isn't a provider, but we fake it is so it can be handled by the clusterctl machinery.
versions:
- name: v1.12.99
- name: v1.13.99
# Use manifest from source files
value: ../../../../cluster-api-provider-vsphere/test/infrastructure/net-operator/config/default
contract: v1beta1
Expand All @@ -268,7 +264,7 @@ providers:
- name: capv-test-extension
type: RuntimeExtensionProvider
versions:
- name: v1.12.99
- name: v1.13.99
# Use manifest from source files
value: ../../../../cluster-api-provider-vsphere/test/extension/config/default
contract: v1beta1
Expand Down
Loading

0 comments on commit 528b282

Please sign in to comment.