Cluster API v1.15 compared to v1.16
This document provides an overview over relevant changes between Cluster API v1.15 and v1.16 for maintainers of providers and consumers of our Go API.
Any feedback or contributions to improve following documentation is welcome!
Go version
Dependencies
Graduation
Implemented proposal
API Changes
Cluster
MachineDeployment
MachinePool
Machine
MachineHealthCheck
ClusterClass
KubeadmConfig
KubeadmConfigTemplate
KubeadmControlPlane
KubeadmControlPlaneTemplate
Runtime hooks Changes
Cluster API Contract changes
Deprecation
Removals
Go packages moved
Suggested changes for providers
- The
ClusterCacheinterface insigs.k8s.io/cluster-api/controllers/clustercachehas a newConnectedmethod, which returns true if there is a connection to the workload cluster; implementations of the interface (e.g. fakes in tests) must implement it. Consumers of theClusterCachecan use this method to check if a connection is available. clustercache.Options.SecretClienthas been renamed toSecretCachingClient. The ClusterCache now reads the kubeconfig Secret on every reconcile of a Cluster to detect kubeconfig changes (e.g. token rotations), so the client must cache kubeconfig Secrets.- The
rest.Configreturned byClusterCache.GetRESTConfigdoesn’t contain the bearer token of the kubeconfig inBearerTokenanymore. The token is added by a transport wrapper instead, so that token rotations are applied without re-creating the connection. Clients created from therest.Configare not affected, but the token cannot be read from therest.Configanymore.