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
webhookspackage. Thus, the following methods onClusterandClusterClassinapi/v1beta1are deprecated:SetupWebhookWithManager,Default,ValidateCreate,ValidateUpdateandValidateDelete. - The
third_party/kubernetes-drainpackage is deprecated, as we’re now usingk8s.io/kubectl/pkg/draininstead (PR). util/version.CompareWithBuildIdentifiershas been deprecated, please useutil/version.Compare(a, b, WithBuildTags())instead.- The functions
annotations.HasPausedAnnotationandannotations.HasSkipRemediationAnnotationhave been deprecated, please useannotations.HasPausedandannotations.HasSkipRemediationrespectively instead.
Removals
KCPUpgradeSpechas been removed. Please useClusterUpgradeConformanceSpecinstead.
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
SetupWithManagerfunc: -
Following packages have been moved to internal
Other
- ClusterClass:
clusterctlis 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
LogFolderparameter when callingCreateKindBootstrapClusterAndLoadImages. Please see this PR for an example on how to use it. - The
gcilinter 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: