Skip to content

Upgrade kubebuilder v4.1.1 to v4.5.2 #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 29, 2025

Conversation

t-persson
Copy link
Collaborator

Applicable Issues

Description of the Change

We've not done this in a while so there's a lot of changes made. Basically I used kubebuilder alpha generate to create all new files and structure that are created using the newer version. Then I diffed all files with the ones we already had and merged them together. I have not noticed any problems, everything builds OK and I was able to start several testruns using the controller so I am quite certain this works.

Note that most changes are automatic and I did not make any functional changes from our side (except for a few golangci-lint complaints). The newer version of kubebuilder also enabled a few github workflows for testing so I fixed a few of the tests for us so they actually work. I will be sending another PR where I increase the coverage of our tests as well.

Alternate Designs

Possible Drawbacks

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by: Tobias Persson [email protected]

We've not done this in a while so there's a lot of changes made.
Basically I used kubebuilder alpha generate to create all new files and
structure that are created using the newer version. Then I diffed all
files with the ones we already had and merged them together.
I have not noticed any problems, everything builds OK and I was able to
start several testruns using the controller so I am quite certain this
works.

Note that most changes are automatic and I did not make any functional
changes from our side (except for a few golangci-lint complaints).
The newer version of kubebuilder also enabled a few github workflows
for testing so I fixed a few of the tests for us so they actually work.
I will be sending another PR where I increase the coverage of our tests
as well.
@t-persson t-persson requested a review from a team as a code owner April 24, 2025 12:38
@t-persson t-persson requested review from fredjn and andmat900 and removed request for a team April 24, 2025 12:38
There were a few dangling resources causing us to have to
recreate the kind cluster every time we wanted to re-run tests.
These tests can now be run multiple times in a row.

I also enabled Prometheus in the e2e tests. This is not something we
need right now, but we will probably need it in the future and it does
not cost that much to add it.
This is not something we are using at the moment, but sadly with the old
version of kubebuilder these conversion webhooks were created
automatically when creating webhooks in general. That means that we have
a conversion webhook in the CRD spec and we are not allowed to update
the CRDs without recreating them (when running with apply
--server-side).
Added more logging as well and fixed a few spelling errors
@t-persson t-persson requested a review from fredjn April 29, 2025 06:59
@t-persson t-persson merged commit 25f2e05 into eiffel-community:main Apr 29, 2025
3 checks passed
@t-persson t-persson deleted the update-kubebuilder-version branch April 29, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants