Cluster API v1.8 compared to v1.9
This document provides an overview over relevant changes between Cluster API v1.8 and v1.9 for maintainers of providers and consumers of our Go API.
Go version
- The Go version used by Cluster API is Go 1.22.x
Changes by Kind
Deprecation
Removals
API Changes
Other
- Notes for Machines managed by KCP (starting with Cluster API v1.8.2):
- KCP adds its own pre-terminate hook on all Machines it controls. This is done to ensure it can later remove the etcd member right before Machine termination (i.e. before InfraMachine deletion).
- Starting with Kubernetes v1.31 the KCP pre-terminate hook will wait for all other pre-terminate hooks to finish to ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is only done for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31. This feature configures the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately starts failing after the etcd member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31 to adhere to the kubelet skew policy.
Suggested changes for providers
- The Errors package was created when capi provider implementation was running as machineActuators that needed to vendor core capi to function. There is no usage recommendations today and its value is questionable since we moved to CRDs that inter-operate mostly via conditions. Instead we plan to drop the dedicated semantic for terminal failure and keep improving Machine lifecycle signal through conditions. Therefore the Errors package has been deprecated in v1.8. It’s recommended to remove any usage of the currently exported variables.
- The
ClusterCacheTracker
component has been deprecated, please use the newClusterCache
instead. For more context and examples for how to use it, see PR: Introduce new ClusterCache and the corresponding issue. Some notes:- The
DisabledFor
option (previouslyClientUncachedObjects
) is not defaulted to&corev1.ConfigMap
&&corev1.Secret
anymore, thus it’s now necessary to explicitly setDisabledFor
to avoid caching ConfigMaps and Secrets. SecretClient
andUserAgent
are now mandatory options, please take a look at the corresponding godoc.
- The