Cluster API v1.0 compared to v1.1
This document provides an overview over relevant changes between ClusterAPI v1.0 and v1.1 for maintainer of other providers and consumers of our Go API.
Minimum Go version
- The Go version used by Cluster API is now Go 1.17+
Dependencies
Note: Only the most relevant dependencies are listed, k8s.io/
and ginkgo
/gomega
dependencies
are kept in sync with the versions used by sigs.k8s.io/controller-runtime
.
- sigs.k8s.io/controller-runtime: v0.10.x => v0.11.x
- k8s.io/*: v0.22.x => v0.23.x (derived from controller-runtime)
- github.com/go-logr/logr: v0.4.0 => v1.2.0 (derived from controller-runtime)
- k8s.io/klog/v2: v2.9.0 => v2.30.0 (derived from controller-runtime)
- sigs.k8s.io/controller-tools: v0.7.x => v0.8.x
- sigs.k8s.io/kind: v0.11.x => v0.11.x
Changes by Kind
Deprecation
- The Cluster and ClusterClass webhooks have been moved to the
webhooks
package. Thus, the following methods onCluster
andClusterClass
inapi/v1beta1
are deprecated:SetupWebhookWithManager
,Default
,ValidateCreate
,ValidateUpdate
andValidateDelete
. - The
third_party/kubernetes-drain
package is deprecated, as we’re now usingk8s.io/kubectl/pkg/drain
instead (PR). util/version.CompareWithBuildIdentifiers
has been deprecated, please useutil/version.Compare(a, b, WithBuildTags())
instead.- The functions
annotations.HasPausedAnnotation
andannotations.HasSkipRemediationAnnotation
have been deprecated, please useannotations.HasPaused
andannotations.HasSkipRemediation
respectively instead.
Removals
KCPUpgradeSpec
has been removed. Please useClusterUpgradeConformanceSpec
instead.
API Change
-
Some controllers have been moved to internal to reduce their API surface. We now only surface what is necessary, e.g. the reconciler and the
SetupWithManager
func: -
Following packages have been moved to internal
Other
- ClusterClass:
clusterctl
is now able to handle cluster templates with ClusterClasses (PR). Please check out the corresponding documentation in clusterctl provider contract If you have any further questions about writing ClusterClasses, please let us know.- e2e tests:
- Test framework provides better logging in case of failures when creating the bootstrap kind cluster; in order to
fully exploit this feature, it is required to pass the
LogFolder
parameter when callingCreateKindBootstrapClusterAndLoadImages
. Please see this PR for an example on how to use it. - The
gci
linter has been enabled to enforce consistent imports. As usual, feel free to take a look at our linter config, but of course it’s not mandatory to adopt it. - The Tilt dev setup has been extended with: