kubebuilder | controller-runtime | Kubernetes |
---|---|---|
1.x | 0.1.x | 1.13 |
2.x | 0.2.x ~ 0.6.x | 1.14 ~ 1.18 |
3.x | 0.7.x ~ ? | 1.19 ~ ? |
Which means the correspondence between controller-runtime and Kubernetes:
- controller-runtime v0.7 - Kubernetes v1.19
- controller-runtime v0.8 - Kubernetes v1.20
- controller-runtime v0.9 - Kubernetes v1.21
- controller-runtime v0.10 - Kubernetes v1.22
- ...
So, you should firstly make sure your local kubebuilder is 3.x, and make clear which versions of Kubernetes and controller-runtime you are going to update.
Usually we bump them every two versions with the even minor version, such as Kubernetes 1.20, 1.22.
- Bump
k8s.io/kubernetes
tov1.x.y
. - Bump
k8s.io/xxx
in require and replace tov0.x.y
, exceptk8s.io/kube-openapi
andk8s.io/utils
, you can ignore them for now. - Bump
sigs.k8s.io/controller-runtime
to matched version with Kubernetes.
Tidy them and download:
$ go mod tidy
$ go mod vendor
Build and test:
$ make build test
Solve all incompatible problems in the project.
We hope the Advanced StatefulSet and Advanced DaemonSet in Kruise should be compatible with the upstream ones. So you should look for the upstream changes and fetch them into Kruise.
This can be done in next individual PRs to make this bump-version-PR more clear and readable.