Cluster API v1.11 compared to v1.12
This document provides an overview over relevant changes between Cluster API v1.11 and v1.12 for maintainers of providers and consumers of our Go API.
Go version
- The minimal Go version required to build Cluster API is v1.24.x
- The Go version used by Cluster API is v1.24.x
Dependencies
- The Controller Runtime version used by Cluster API is v0.22.x
- The version of the Kubernetes libraries used by Cluster API is v1.34.x
Changes by Kind
Deprecation
Removals
API Changes
Other
util.IsOwnedByObject
,util.IsControlledBy
andcollections.OwnedMachines
now also requireschema.GroupKind
as input parameter.schema.GroupKind
is needed for cases where typed objects are passed in because controller-runtime does not guarantee that GVK is set on typed objects.
Suggested changes for providers
- For providers that copied the core Cluster API v1beta1
APIEndpoint
struct and used it in their InfraCluster Go type it is recommended to now make theHost
andPort
fields optional (they already have been made optional inclusterv1beta1.APIEndpoint
in Cluster API v1.12). tl;dr The fields were previously required, but due to side effects that validation was never enforced. These side effects might go away which then makes the fields suddenly required. To avoid issues we recommend making the fields optional. Similar to how they are optional in the v1beta2APIEndpoint
struct and v1beta2 InfraCluster contract. For more details, please see: https://github.com/kubernetes-sigs/cluster-api/pull/12634#discussion_r2275468291. But this might look differently depending on how your InfraCluster Go type and corresponding mutating webhook evolved over time.