Skip to content

Commit

Permalink
Merge pull request #8996 from killianmuldoon/pr-stop-serving-v1alpha4
Browse files Browse the repository at this point in the history
⚠️  Stop serving v1alpha4 API Versions
  • Loading branch information
k8s-ci-robot authored Jul 13, 2023
2 parents 46e045c + acffb87 commit 6acff21
Show file tree
Hide file tree
Showing 49 changed files with 75 additions and 280 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,11 @@ generate-modules: ## Run go mod tidy to ensure modules are up to date
cd $(TEST_DIR); go mod tidy

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

DOCKER_TEMPLATES := test/e2e/data/infrastructure-docker
INMEMORY_TEMPLATES := test/e2e/data/infrastructure-inmemory

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

.PHONY: generate-e2e-templates-v1.0
generate-e2e-templates-v1.0: $(KUSTOMIZE)
$(KUSTOMIZE) build $(DOCKER_TEMPLATES)/v1.0/cluster-template --load-restrictor LoadRestrictionsNone > $(DOCKER_TEMPLATES)/v1.0/cluster-template.yaml
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (v APIEndpoint) String() string {
// ANCHOR_END: APIEndpoint

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=clusters,shortName=cl,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/clusterclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=clusterclasses,shortName=cc,scope=Namespaced,categories=cluster-api
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of ClusterClass"
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ type Bootstrap struct {
// ANCHOR_END: Bootstrap

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=machines,shortName=ma,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/machinedeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ func (md *MachineDeploymentStatus) GetTypedPhase() MachineDeploymentPhase {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=machinedeployments,shortName=md,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/machinehealthcheck_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ type MachineHealthCheckStatus struct {
// ANCHOR_END: MachineHealthCheckStatus

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=machinehealthchecks,shortName=mhc;mhcs,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha4/machineset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func (m *MachineSet) Validate() field.ErrorList {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=machinesets,shortName=ms,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions bootstrap/kubeadm/api/v1alpha4/kubeadmconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ type KubeadmConfigStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=kubeadmconfigs,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type KubeadmConfigTemplateResource struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfigTemplate"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_clusters.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinepools.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machines.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/crd/bases/cluster.x-k8s.io_machinesets.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ type KubeadmControlPlaneStatus struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=kubeadmcontrolplanes,shortName=kcp,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type KubeadmControlPlaneTemplateSpec struct {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=kubeadmcontrolplanetemplates,scope=Namespaced,categories=cluster-api
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmControlPlaneTemplate"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
- [v1.2 to v1.3](./developer/providers/migrations/v1.2-to-v1.3.md)
- [v1.3 to v1.4](./developer/providers/migrations/v1.3-to-v1.4.md)
- [v1.4 to v1.5](./developer/providers/migrations/v1.4-to-v1.5.md)
- [v1.5 to v1.6](./developer/providers/migrations/v1.5-to-v1.6.md)
- [Provider contracts](./developer/providers/contracts.md)
- [Cluster Infrastructure](./developer/providers/cluster-infrastructure.md)
- [Machine Infrastructure](./developer/providers/machine-infrastructure.md)
Expand Down
3 changes: 1 addition & 2 deletions docs/book/src/clusterctl/commands/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,10 @@ Cluster API only tests a subset of possible clusterctl upgrade paths as otherwis
Untested upgrade paths are not blocked by clusterctl and should work in general, they are just not tested. Users
intending to use an upgrade path not tested by us should do their own validation to ensure the operation works correctly.

The following is an example of the tested upgrade paths while v1.5 is being developed:
The following is an example of the tested upgrade paths while v1.6 is being developed:

| From | To | Note |
|------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| v0.4 | latest | v0.4 is the latest supported minor release with the v1alpha4 contract (v0.4 is EOL since 2022-04-06). This test will be removed once the v1alpha4 apiVersion is removed. |
| v1.0 | latest | v1.0 is the first release with the v1beta1 contract. |
| v1.3 | latest | v1.3 is a currently supported release. This test will be removed when v1.5 is released and a new test for v1.5 is added. |
| v1.4 | latest | v1.4 is a currently supported release. This test will be removed when v1.6 is released and a new test for v1.6 is added. |
Expand Down
33 changes: 33 additions & 0 deletions docs/book/src/developer/providers/migrations/v1.5-to-v1.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Cluster API v1.5 compared to v1.6

This document provides an overview over relevant changes between Cluster API v1.5 and v1.6 for
maintainers of providers and consumers of our Go API.

## Go version

- The Go version used by Cluster API is Go 1.20.x

## Dependencies

**Note**: Only the most relevant dependencies are listed, `k8s.io/` and `ginkgo`/`gomega` dependencies in Cluster API are kept in sync with the versions used by `sigs.k8s.io/controller-runtime`.

- sigs.k8s.io/kind: v0.20.x
- sigs.k8s.io/controller-runtime: v0.15.x
- sigs.k8s.io/controller-tools: v0.12.x

## Changes by Kind

### Deprecation

### Removals

- API version `v1alpha4` is not served in v1.6 (users can enable it manually in case they are lagging behind with deprecation cycles). Important: `v1alpha4` will be completely removed in 1.7.

### API Changes


### Other


### Suggested changes for providers

2 changes: 1 addition & 1 deletion docs/release/release-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This document details the responsibilities and tasks for each role in the releas
- [Prepare main branch for development of the new release](#prepare-main-branch-for-development-of-the-new-release)
- [Create a new GitHub milestone for the next release](#create-a-new-github-milestone-for-the-next-release)
- [\[Track\] Remove previously deprecated code](#track-remove-previously-deprecated-code)
-
- [\[Track\] Bump dependencies](#track-bump-dependencies)
- [Create a release branch](#create-a-release-branch)
- [\[Continuously\] Maintain the GitHub release milestone](#continuously-maintain-the-github-release-milestone)
Expand Down Expand Up @@ -94,7 +95,6 @@ is used for e.g. local development and e2e tests. We also modify tests so that t
This comes down to changing occurrences of the old version to the new version, e.g. `v1.3` to `v1.4`:
1. Setup E2E tests for the new release:
1. Goal is that we have clusterctl upgrade tests for the latest stable versions of each contract / for each supported branch. For `v1.5` this means:
* v1alpha4: `v0.4`
* v1beta1: `v1.0`, `v1.3`, `v1.4` (will change with each new release)
2. Update providers in `docker.yaml`:
1. Add a new `v1.4.0` entry.
Expand Down
1 change: 1 addition & 0 deletions exp/addons/api/v1alpha4/clusterresourceset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func (m *ClusterResourceSet) SetConditions(conditions clusterv1alpha4.Conditions
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=clusterresourcesets,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions exp/addons/api/v1alpha4/clusterresourcesetbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func (c *ClusterResourceSetBinding) DeleteBinding(clusterResourceSet *ClusterRes
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=clusterresourcesetbindings,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions exp/api/v1alpha4/machinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (m *MachinePoolStatus) GetTypedPhase() MachinePoolPhase {
}

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:deprecatedversion
// +kubebuilder:resource:path=machinepools,shortName=mp,scope=Namespaced,categories=cluster-api
// +kubebuilder:subresource:status
Expand Down
31 changes: 0 additions & 31 deletions test/e2e/clusterctl_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,6 @@ import (
"sigs.k8s.io/cluster-api/test/framework"
)

var _ = Describe("When testing clusterctl upgrades (v0.4=>current)", func() {
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
return ClusterctlUpgradeSpecInput{
E2EConfig: e2eConfig,
ClusterctlConfigPath: clusterctlConfigPath,
BootstrapClusterProxy: bootstrapClusterProxy,
ArtifactFolder: artifactFolder,
SkipCleanup: skipCleanup,
InfrastructureProvider: pointer.String("docker"),
InitWithBinary: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.8/clusterctl-{OS}-{ARCH}",
InitWithProvidersContract: "v1alpha4",
// NOTE: If this version is changed here the image and SHA must also be updated in all DockerMachineTemplates in `test/data/infrastructure-docker/v0.4/bases.
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.
PostUpgrade: func(proxy framework.ClusterProxy, namespace, clusterName string) {
framework.ValidateOwnerReferencesOnUpdate(proxy, namespace,
framework.CoreOwnerReferenceAssertion,
framework.ExpOwnerReferenceAssertions,
framework.DockerInfraOwnerReferenceAssertions,
framework.KubeadmBootstrapOwnerReferenceAssertions,
framework.KubeadmControlPlaneOwnerReferenceAssertions,
framework.KubernetesReferenceAssertions,
)
},
}
})
})

var _ = Describe("When testing clusterctl upgrades (v1.0=>current)", func() {
ClusterctlUpgradeSpec(ctx, func() ClusterctlUpgradeSpecInput {
return ClusterctlUpgradeSpecInput{
Expand Down
Loading

0 comments on commit 6acff21

Please sign in to comment.