Skip to content

Commit

Permalink
Prepare main branch for v1.8 development (kubernetes-sigs#10524)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nivedita-coder authored May 24, 2024
1 parent 4d16862 commit 25fa000
Show file tree
Hide file tree
Showing 24 changed files with 1,089 additions and 54 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ generate-doctoc:
TRACE=$(TRACE) ./hack/generate-doctoc.sh

.PHONY: generate-e2e-templates
generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.0 v1.5 v1.6 main) ## Generate cluster templates for all versions
generate-e2e-templates: $(KUSTOMIZE) $(addprefix generate-e2e-templates-, v0.3 v0.4 v1.0 v1.5 v1.6 v1.7 main) ## Generate cluster templates for all versions

DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker
INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory
Expand All @@ -583,6 +583,11 @@ generate-e2e-templates-v1.6: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/cluster-template.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.6/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.6/cluster-template-topology.yaml

.PHONY: generate-e2e-templates-v1.7
generate-e2e-templates-v1.7: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.7/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.7/cluster-template.yaml
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.7/cluster-template-topology --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.7/cluster-template-topology.yaml

.PHONY: generate-e2e-templates-main
generate-e2e-templates-main: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/main/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/main/cluster-template.yaml
Expand Down
12 changes: 6 additions & 6 deletions cmd/clusterctl/hack/create-local-repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,36 @@
providers = {
'cluster-api': {
'componentsFile': 'core-components.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'CoreProvider',
},
'bootstrap-kubeadm': {
'componentsFile': 'bootstrap-components.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'BootstrapProvider',
'configFolder': 'bootstrap/kubeadm/config/default',
},
'control-plane-kubeadm': {
'componentsFile': 'control-plane-components.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'ControlPlaneProvider',
'configFolder': 'controlplane/kubeadm/config/default',
},
'infrastructure-docker': {
'componentsFile': 'infrastructure-components-development.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'InfrastructureProvider',
'configFolder': 'test/infrastructure/docker/config/default',
},
'infrastructure-in-memory': {
'componentsFile': 'infrastructure-components-in-memory-development.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'InfrastructureProvider',
'configFolder': 'test/infrastructure/inmemory/config/default',
},
'runtime-extension-test': {
'componentsFile': 'runtime-extension-components-development.yaml',
'nextVersion': 'v1.7.99',
'nextVersion': 'v1.8.99',
'type': 'RuntimeExtensionProvider',
'configFolder': 'test/extension/config/default',
},
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/internal/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const (

var (
// Defines the default version to be used for the provider CR if no version is specified in the tilt-provider.yaml|json file.
defaultProviderVersion = "v1.7.99"
defaultProviderVersion = "v1.8.99"

// This data struct mirrors a subset of info from the providers struct in the tilt file
// which is containing "hard-coded" tilt-provider.yaml files for the providers managed in the Cluster API repository.
Expand Down
3 changes: 3 additions & 0 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 1
minor: 8
contract: v1beta1
- major: 1
minor: 7
contract: v1beta1
Expand Down
50 changes: 27 additions & 23 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ var _ = Describe("When testing clusterctl upgrades (v0.3=>v1.5=>current)", func(
// NOTE: The combination of v0.3=>v1.5=>current allows us to verify this without being forced to upgrade
// the management cluster in the middle of the test as all 3 versions are ~ compatible with the same mgmt and workload Kubernetes versions.
// Additionally, clusterctl v1.5 still allows the upgrade of management clusters from v1alpha3 (v1.6 doesn't).
// https://github.com/kubernetes-sigs/cluster-api/blob/release-1.5/cmd/clusterctl/client/upgrade.go#L151-L159
// https://github.com/kubernetes-sigs/cluster-api/blob/release-1.6/cmd/clusterctl/client/upgrade.go#L149-L155

// Get v0.3 latest stable release
version03 := "0.3"
Expand Down Expand Up @@ -117,6 +119,8 @@ var _ = Describe("When testing clusterctl upgrades (v0.4=>v1.6=>current)", func(
// NOTE: The combination of v0.4=>v1.6=>current allows us to verify this without being forced to upgrade
// the management cluster in the middle of the test as all 3 versions are ~ compatible with the same mgmt and workload Kubernetes versions.
// Additionally, clusterctl v1.6 still allows the upgrade of management clusters from v1alpha4 (v1.7 doesn't).
// https://github.com/kubernetes-sigs/cluster-api/blob/release-1.6/cmd/clusterctl/client/upgrade.go#L149-L155
// https://github.com/kubernetes-sigs/cluster-api/blob/release-1.7/cmd/clusterctl/client/upgrade.go#L145-L148

// Get v0.4 latest stable release
version04 := "0.4"
Expand Down Expand Up @@ -210,9 +214,9 @@ var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
})
})

var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() {
// Get v1.5 latest stable release
version := "1.5"
var _ = Describe("When testing clusterctl upgrades (v1.6=>current)", func() {
// Get v1.6 latest stable release
version := "1.6"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
Expand All @@ -225,25 +229,25 @@ var _ = Describe("When testing clusterctl upgrades (v1.5=>current)", func() {
InfrastructureProvider: ptr.To("docker"),
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
// We have to pin the providers because with `InitWithProvidersContract` the test would
// use the latest version for the contract (which is v1.6.X for v1beta1).
// use the latest version for the contract (which is the next minor for v1beta1).
InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease),
InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease)},
InitWithProvidersContract: "v1beta1",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.28.0",
WorkloadKubernetesVersion: "v1.28.0",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.29.0",
WorkloadKubernetesVersion: "v1.29.0",
MgmtFlavor: "topology",
WorkloadFlavor: "",
UseKindForManagementCluster: true,
}
})
})

var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>current) [ClusterClass]", func() {
// Get v1.5 latest stable release
version := "1.5"
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.6=>current) [ClusterClass]", func() {
// Get v1.6 latest stable release
version := "1.6"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
Expand All @@ -256,25 +260,25 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.5=>cur
InfrastructureProvider: ptr.To("docker"),
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
// We have to pin the providers because with `InitWithProvidersContract` the test would
// use the latest version for the contract (which is v1.6.X for v1beta1).
// use the latest version for the contract (which is the next minor for v1beta1).
InitWithCoreProvider: fmt.Sprintf(providerCAPIPrefix, stableRelease),
InitWithBootstrapProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithControlPlaneProviders: []string{fmt.Sprintf(providerKubeadmPrefix, stableRelease)},
InitWithInfrastructureProviders: []string{fmt.Sprintf(providerDockerPrefix, stableRelease)},
InitWithProvidersContract: "v1beta1",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.28.0",
WorkloadKubernetesVersion: "v1.28.0",
InitWithKubernetesVersion: "v1.29.0",
WorkloadKubernetesVersion: "v1.29.0",
MgmtFlavor: "topology",
WorkloadFlavor: "topology",
UseKindForManagementCluster: true,
}
})
})

var _ = Describe("When testing clusterctl upgrades (v1.6=>current)", func() {
// Get v1.6 latest stable release
version := "1.6"
var _ = Describe("When testing clusterctl upgrades (v1.7=>current)", func() {
// Get v1.7 latest stable release
version := "1.7"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
Expand All @@ -288,18 +292,18 @@ var _ = Describe("When testing clusterctl upgrades (v1.6=>current)", func() {
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
InitWithProvidersContract: "v1beta1",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.29.2",
WorkloadKubernetesVersion: "v1.29.2",
InitWithKubernetesVersion: "v1.30.0",
WorkloadKubernetesVersion: "v1.30.0",
MgmtFlavor: "topology",
WorkloadFlavor: "",
UseKindForManagementCluster: true,
}
})
})

var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.6=>current) [ClusterClass]", func() {
// Get v1.6 latest stable release
version := "1.6"
var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.7=>current) [ClusterClass]", func() {
// Get v1.7 latest stable release
version := "1.7"
stableRelease, err := GetStableReleaseOfMinor(ctx, version)
Expect(err).ToNot(HaveOccurred(), "Failed to get stable version for minor release : %s", version)
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
Expand All @@ -313,8 +317,8 @@ var _ = Describe("When testing clusterctl upgrades using ClusterClass (v1.6=>cur
InitWithBinary: fmt.Sprintf(clusterctlDownloadURL, stableRelease),
InitWithProvidersContract: "v1beta1",
// Note: Both InitWithKubernetesVersion and WorkloadKubernetesVersion should be the highest mgmt cluster version supported by the source Cluster API version.
InitWithKubernetesVersion: "v1.29.2",
WorkloadKubernetesVersion: "v1.29.2",
InitWithKubernetesVersion: "v1.30.0",
WorkloadKubernetesVersion: "v1.30.0",
MgmtFlavor: "topology",
WorkloadFlavor: "topology",
UseKindForManagementCluster: true,
Expand Down
Loading

0 comments on commit 25fa000

Please sign in to comment.