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 v1beta1 for ipam.cluster.x-k8s.io IPAddresses and IPAddressClaims. Conversion webhooks handle translation between the hub version v1beta1 and spoke v1alpha1.

Deprecation

  • The function sigs.k8s.io/cluster-api/addons/api/v1beta1 DeleteBinding has been deprecated. Please use RemoveBinding from the same package instead.

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.
  • The function(s):
    • ClusterToObjectsMapper is removed, please use ClusterToTypedObjectsMapper function instead.
    • Poll and PollImmediate are removed, please use utils from “k8s.io/apimachinery/pkg/util/wait” instead.
  • The variable DefaultIndexes is removed, please use []Index{NodeProviderIDIndex}
  • ProviderID type and all related methods/construct have been removed. Please see this PR for a reference.

API Changes

  • Several public functions in cmd/clusterctl/ now require context.Context as the first parameter.

Other

  • clusterctl move can be blocked temporarily by a provider when an object to be moved is annotated with clusterctl.cluster.x-k8s.io/block-move.
  • mdbook releaselink has been changed to require a repo tag when used in markdown files for generating a book with mdbook.
  • framework.DumpKubeSystemPodsForCluster was renamed to framework.DumpResourcesForCluster to facilitate the gathering of additional workload cluster resources. Pods in all namespaces and Nodes are gathered from workload clusters. Pod yamls are available in clusters/*/resources/Pod and Node yaml is available in clusters/*/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-addr flag and introduced the new --diagnostics-address and --insecure-diagnostic flags. 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.