-
Notifications
You must be signed in to change notification settings - Fork 6
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
t-persson
merged 7 commits into
eiffel-community:main
from
t-persson:update-kubebuilder-version
Apr 29, 2025
Merged
Upgrade kubebuilder v4.1.1 to v4.5.2 #405
t-persson
merged 7 commits into
eiffel-community:main
from
t-persson:update-kubebuilder-version
Apr 29, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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).
fredjn
requested changes
Apr 28, 2025
Added more logging as well and fixed a few spelling errors
fredjn
approved these changes
Apr 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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]