Skip to content

Commit 6914aa0

Browse files
Merge pull request #296 from cybozu-go/push-mumuzkuksspl
follow Kubebuilder recommendations in maintenance
2 parents 1bd7c7e + c401a87 commit 6914aa0

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/maintenance.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,29 @@ To change the versions, edit the following files.
2121
- `README.md`
2222
- `versions.mk`
2323

24-
We should also update go.mod by the following commands. Note that `k8s.io/api`, `k8s.io/apimachinery`, and `k8s.io/client-go` use `v0.x.x` tags (e.g., v1.35.4 → v0.35.4), while `k8s.io/kubernetes` uses `v1.x.x` tags directly.
24+
We should also update go.mod. According to [the Kubebuilder documentation](https://book.kubebuilder.io/versions_compatibility_supportability), we should use versions compatible with Kubebuilder, so refer to the samples in the latest Kubebuilder testdata directory (e.g., https://github.com/kubernetes-sigs/kubebuilder/blob/v4.1.1/testdata/project-v4/go.mod#L8-L11 and https://github.com/kubernetes-sigs/kubebuilder/blob/v4.1.1/testdata/project-v4/Makefile#L162) to see which versions should be used.
25+
26+
First, update `k8s.io/*` libraries. Please note that `k8s.io/api`, `k8s.io/apimachinery`, and `k8s.io/client-go` use `v0.x.x` tags (e.g., v1.35.4 → v0.35.4), while `k8s.io/kubernetes` uses `v1.x.x` tags directly.
2527

2628
```bash
2729
$ VERSION=0.<minor>.<patch> # e.g. 0.35.4 for Kubernetes 1.35.4
2830
$ go get k8s.io/api@v${VERSION} k8s.io/apimachinery@v${VERSION} k8s.io/client-go@v${VERSION}
2931
$ go get k8s.io/kubernetes@v1.<minor>.<patch> # e.g. v1.35.4
3032
```
3133

32-
Read the [`controller-runtime`'s release note](https://github.com/kubernetes-sigs/controller-runtime/releases), and update to the newest version that is compatible with all supported kubernetes versions. If there are breaking changes, we should decide how to manage these changes.
34+
Next, update controller-runtime by the following command. Before updating it, please read the [`controller-runtime`'s release note](https://github.com/kubernetes-sigs/controller-runtime/releases). If there are breaking changes, we should decide how to manage these changes.
3335

3436
```
3537
$ VERSION=<upgrading controller-runtime version>
3638
$ go get sigs.k8s.io/controller-runtime@v${VERSION}
3739
```
3840

39-
Read the [`controller-tools`'s release note](https://github.com/kubernetes-sigs/controller-tools/releases), and update to the newest version that is compatible with all supported kubernetes versions. If there are breaking changes, we should decide how to manage these changes.
41+
Finally, update controller-tools. Before updating it, please read the [`controller-tools`'s release note](https://github.com/kubernetes-sigs/controller-tools/releases). If there are breaking changes, we should decide how to manage these changes.
4042
To change the version, edit `versions.mk`.
4143

4244
#### Go
4345

44-
Choose the same version of Go [used by the latest Kubernetes](https://github.com/kubernetes/kubernetes/blob/master/go.mod) supported by Mantle.
46+
Choose the version compatible with Kubebuilder (e.g., https://github.com/kubernetes-sigs/kubebuilder/blob/v4.1.1/testdata/project-v4/go.mod#L3).
4547

4648
Edit the following files.
4749

@@ -51,7 +53,7 @@ Edit the following files.
5153

5254
#### Depending tools
5355

54-
The following tools do not depend on other software, use the latest versions.
56+
The following tools don't depend on other software, so use the latest versions.
5557
To change their versions, edit `versions.mk`.
5658

5759
- [helm](https://github.com/helm/helm/releases)

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/cybozu-go/mantle
22

3-
go 1.25.0
4-
5-
toolchain go1.25.7
3+
go 1.25.7
64

75
require (
86
github.com/aws/aws-sdk-go-v2 v1.41.7

0 commit comments

Comments
 (0)