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 => v0.16.x
- sigs.k8s.io/controller-tools: v0.12.x
Changes by Kind
- Introduced
v1beta1for ipam.cluster.x-k8s.io IPAddresses and IPAddressClaims. Conversion webhooks handle translation between the hub versionv1beta1and spokev1alpha1.
Deprecation
- The function
sigs.k8s.io/cluster-api/addons/api/v1beta1DeleteBindinghas been deprecated. Please useRemoveBindingfrom the same package instead.
Removals
- API version
v1alpha4is not served in v1.6 (users can enable it manually in case they are lagging behind with deprecation cycles). Important:v1alpha4will be completely removed in 1.7. - The function(s):
ClusterToObjectsMapperis removed, please useClusterToTypedObjectsMapperfunction instead.PollandPollImmediateare removed, please use utils from “k8s.io/apimachinery/pkg/util/wait” instead.
- The variable
DefaultIndexesis removed, please use[]Index{NodeProviderIDIndex} ProviderIDtype and all related methods/construct have been removed. Please see this PR for a reference.
API Changes
- Several public functions in
cmd/clusterctl/now requirecontext.Contextas the first parameter.
Other
clusterctl movecan be blocked temporarily by a provider when an object to be moved is annotated withclusterctl.cluster.x-k8s.io/block-move.mdbook releaselinkhas been changed to require arepotag when used in markdown files for generating a book withmdbook.framework.DumpKubeSystemPodsForClusterwas renamed toframework.DumpResourcesForClusterto facilitate the gathering of additional workload cluster resources. Pods in all namespaces and Nodes are gathered from workload clusters. Pod yamls are available inclusters/*/resources/Podand Node yaml is available inclusters/*/resources/Node.
Suggested changes for providers
- In order to reduce dependencies for API package consumers, CAPI has diverged from the default kubebuilder scheme builder. This new pattern may also be useful for reducing dependencies in provider API packages. For more information see the implementers guide.
- We deprecated the
--metrics-bind-addrflag and introduced the new--diagnostics-addressand--insecure-diagnosticflags. These flags allow exposing metrics, a pprof endpoint and an endpoint to change log levels securely in production. It is recommended to implement the same changes in providers, please see #9264 for more details.