Skip to content

Commit 5d55ca2

Browse files
committed
Add migration notes
Signed-off-by: Stefan Büringer [email protected]
1 parent 99f128f commit 5d55ca2

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This document provides an overview over relevant changes between Cluster API v1.4 and v1.5 for
44
maintainers of providers and consumers of our Go API.
55

6-
## Minimum Go version
6+
## Go version
77

88
- The Go version used by Cluster API is Go 1.20.x
99

@@ -12,6 +12,8 @@ maintainers of providers and consumers of our Go API.
1212
**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`.
1313

1414
- sigs.k8s.io/kind: v0.17.x => v0.19.x
15+
- sigs.k8s.io/controller-runtime: v0.14.x => v0.15.x
16+
- sigs.k8s.io/controller-tools: v0.11.x => v0.12.x
1517

1618
## Changes by Kind
1719

@@ -36,3 +38,21 @@ maintainers of providers and consumers of our Go API.
3638
### Suggested changes for providers
3739

3840
-
41+
42+
## Notes about the controller-runtime bump
43+
44+
This section shares our learnings of bumping controller-runtime to v0.15 in core Cluster API. It highlights the most relevant changes and pitfalls
45+
for Cluster API providers. For the full list of changes please see the [controller-runtime release notes](https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0).
46+
47+
* Webhooks can now also return warnings, this requires adding an additional `admission.Warnings` return parameter to all webhooks.
48+
* Manager options have been refactored and old fields have been deprecated.
49+
* Manager now has a builtin profiler server which can be enabled via `Options.PprofBindAddress`, this allows us to remove our profiler server.
50+
* Controller builder has been refactored, this requires small changes to our controller setup code.
51+
* The EventHandler interface has been modified to also take a context, which affects our mapping functions (e.g. `ClusterToInfrastructureMapFunc`).
52+
* Controller-runtime now uses a lazy restmapper per default, i.e. API groups and resources are only fetched when they are actually used.
53+
This should drastically reduce the amount of API calls in clusters with a lot of CRDs.
54+
* Some wait utils in `k8s.io/apimachinery/pkg/util/wait` have been deprecated. The migration is relatively straightforward except that passing in `0`
55+
as a timeout in `wait.PollUntilContextTimeout` is treated as a timeout with 0 seconds, in `wait.PollImmediateWithContext` it is interpreted as infinity.
56+
* The fake client has been improved to handle status properly. In tests that write the CRD status, the CRDs should be added to the fake client via `WithStatusSubresource`.
57+
58+
For reference, please see the [Bump to CR v0.15 PR](https://github.com/kubernetes-sigs/cluster-api/pull/8007) in core Cluster API.

0 commit comments

Comments
 (0)