Skip to content

Conversation

@int128-actions-tanpopo
Copy link
Contributor

Upgrade kubebuilder to v4.5.2

Goal

Update the project to use kubebuilder v4.5.2.

Doc

https://github.com/int128/kubebuilder-updates?tab=readme-ov-file#update-kubebuilder-from-v451-to-v452

Steps

Apply the patch to update the project from v4.5.1 to v4.5.2:

git fetch https://github.com/int128/kubebuilder-updates cbcad932011cd36db023cada2ec80caefa85f723
git cherry-pick cbcad932011cd36db023cada2ec80caefa85f723

Check the conflicts.

git status --short --branch

If a file does not exist in the project, remove it.
For example, git status shows the following:

M  Makefile
M  cmd/main.go
DU config/crd/bases/webapp.int128.github.io_guestbooks.yaml
M  config/default/kustomization.yaml
M  config/prometheus/monitor_tls_patch.yaml
UU go.mod
UU go.sum
DU internal/controller/guestbook_controller.go
DU test/e2e/e2e_suite_test.go
DU test/e2e/e2e_test.go

Then, remove the following files:

  • config/crd/bases/webapp.int128.github.io_guestbooks.yaml
  • internal/controller/guestbook_controller.go
  • test/e2e/e2e_suite_test.go
  • test/e2e/e2e_test.go

Resolve the conflicts as follows:

  • go.mod
    • Use the original version.
  • go.sum
    • After resolving the conflicts, run go mod tidy to update the file.
  • Others
    • Apply the merged changes.

Do not run git cherry-pick --continue.

Finally, run the following commands to update the project:

make generate manifests

@int128-actions-tanpopo int128-actions-tanpopo bot requested a review from int128 June 15, 2025 23:55
@int128 int128 merged commit fdf876c into main Jun 16, 2025
14 checks passed
@int128 int128 deleted the bot--tasks-kubebuilder-v4-5-2 branch June 16, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants