Update dependency kubernetes-sigs/kubebuilder to v4#203
Merged
Conversation
011b917 to
4c2c7de
Compare
688af83 to
6267bf7
Compare
6267bf7 to
08919aa
Compare
08919aa to
712fcd9
Compare
712fcd9 to
0921917
Compare
e6d1f5e to
2d12e5b
Compare
2d12e5b to
98b2d05
Compare
98b2d05 to
6c7fd83
Compare
6c7fd83 to
2ae8551
Compare
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
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.
This PR contains the following updates:
v3.15.1->v4.5.0Release Notes
kubernetes-sigs/kubebuilder (kubernetes-sigs/kubebuilder)
v4.5.0Compare Source
changes since v4.4.0
(go-v4): Upgrade controller-runtime from
v0.19.4tov0.20.0and add support for Kubernetes 1.32 (#4492). See the controller-runtime release notes to learn more about the breaking changes introduced.(Projects using webhooks):
Controller-runtime removed the deprecated
webhook.Validatorandwebhook.Defaulterinterfaces. Additionally, webhooks should no longer reside under theapidirectory. Kubebuilder projects have not scaffolded webhooks in this directory or used the deprecated interfaces since v4.3.0.If you are using these interfaces or the legacy
apisdirectory for webhooks, please refer to the v4.3.0 release notes, which provide guidance on updating your projects to align with the current standards.To assist with migration or reduce the burden on users, Kubebuilder has introduced a flag option to allow scaffolding webhooks using the new interfaces in the legacy path. For now, you can scaffold webhooks in the legacy path (under
api) by using the commandkubebuilder create webhook [OPTIONS] --legacy=true. For reference, you can look at the CronJob Tutorial sample webhooks implementation.✨ New Features
v0.17.0tov0.17.1(#4493)v1.62.2tov1.63.4(#4494)v1.16.0tov1.16.3(#4497)🐛 Bug Fixes
1.23.0(#4491)docker.ioprefix for Docker Hub images (#4513)What's Changed
v1.16.0tov1.16.3by @camilamacedo86 in https://github.com/kubernetes-sigs/kubebuilder/pull/4497New Contributors
Full Changelog: kubernetes-sigs/kubebuilder@v4.4.0...v4.5.0
v4.4.0Compare Source
changes since v4.3.1
✨ New Features
v1.61.0tov1.62.2(#4448)1.23(#4446)controller-genfromv0.16.4tov0.17.0. (#4254, #4457)v0.19.1tov0.19.4(#4482)config/rbacto help cluster admins manage the permissions for their solutions. The comments and explanations added to these scaffolds have been improved. Furthermore, it now includes admin-specific rules to make it easier for cluster admins to work with features like aggregation (e.g.,rbac.authorization.k8s.io/aggregate-to-admin). More info. (#4299)go.modfor Go version management and automating ENVTEST versioning by retrieving the version directly fromgo.mod, based on thecontroller-runtimedependency in use. (#4385) (#4401)helm.kubebuilder.io/v1-alphaplugin to enable users to distribute solutions using Helm Charts. Example scaffolds are available under testdata/project-v4-with-plugins/dist/chart. (#4227, #4315, #4350, #4351, #4356, #4357, #4371, #4377, #4383, #4380, #4373, #4386, #4375, #4388, #4406, #4399, #4419,#4451). IMPORTANT: Thehelm.kubebuilder.io/v1-alphais an experimental initial version. (More info)app.kubernetes.io/namelabel to allow more precise configurations (#4437)Create API to test conversion from v1 to v2
$ kubebuilder create api --group crew --version v1 --kind FirstMate --controller=true --resource=true --make=false
$ kubebuilder create api --group crew --version v2 --kind FirstMate --controller=false --resource=true --make=false
$ kubebuilder create webhook --group crew --version v1 --kind FirstMate --conversion --make=false --spoke v2
v4.3.1Compare Source
changes since v4.3.0
✨ New Features
controller-runtimefromv0.19.0tov0.19.1. (#4234)kustomizefromv5.4.3tov5.5.0(#4235)golangci-lintfromv1.59tov1.61with minor adjustments for lint rules. (#4236)🐛 Bug Fixes
config/crd/patchesto ensure the/convertservice patch is only created for webhooks configured with--conversion. (#4280)cmd/main.go, providing clarity on secure metrics setup. (#4245)--make=falseoption for webhook creation, ensuring consistency with other command options and improved flexibility. (#4275)cert-manageruncomment block to the top ofkustomization.yamlto enhance visibility (#4283)main.goboilerplate into thecmd/directory. This change is relevant for users consuming the framework as a library and Kubebuilder maintainers only, providing a cleaner separation of code. (#4246)What's Changed
New Contributors
Full Changelog: kubernetes-sigs/kubebuilder@v4.3.0...v4.3.1
v4.3.0Compare Source
changes since v4.2.0
(Only projects using webhooks are impacted by)
Controller runtime has deprecated the
webhook.Validatorandwebhook.Defaulterinterfaces, and they will no longer be provided in future versions. Therefore, projects must adopt the newCustomValidatorandCustomDefaulterinterfaces to remain compatible with controller-runtimev0.20.0and upper versions. For more details, refer to controller-runtime/issues/2641.Furthermore, webhooks should no longer reside under the
apidirectory. Instead, they should be relocated tointernal/webhook. For now, you can scaffold webhooks in the legacy path (underapi) by using the commandkubebuilder create webhook [OPTIONS] --legacy=true, which scaffolds using theCustomValidatorandCustomDefaulterinterfaces. However, please note that this flag is deprecated and will be removed in upcoming releases.Steps to Migrate:
Move Webhook Files to the Internal Directory:
Depending on your project structure, move the webhook files:
Single Group Layout: Move from
api/<version>tointernal/webhook/<version>.Before:
After:
Multigroup Layout: Move from
api/<group>/<version>tointernal/webhook/<group>/<version>.Before:
After:
Update Imports:
After moving the files, ensure that all references to webhooks are updated in your
main.goand other files. For example, update the import:Before:
After:
Replace Deprecated Interfaces with Custom Ones:
Replace
webhook.Validatorandwebhook.Defaulterwith the newCustomValidatorandCustomDefaulterinterfaces:Before:
After:
Example: See the tutorial: CronJob Webhook Example.
Note: You might want to use the Upgrade Assistance to re-scaffold your project and then apply your code changes on top, ensuring that all necessary updates are addressed. Also,
webhook.Validatorandwebhook.Defaulterinterfaces withCustomValidatorandCustomDefaulter. Projects using the old interfaces must migrate to ensure compatibility with future versions. (#4060)api/<version>orapi/<group>/<version>tointernal/webhook/<version>orinternal/webhook/<group>/<version>. This restructuring improves project organization. (#4150)APIPackagePathLegacymethod, which has been obsolete since release 4.0.0. This change cleans up unused code. (#4182)HasFragmentmethod, favoringHasFileContentWithto reduce duplication and simplify the codebase. (#4191)✨ New Features
e2e/tests, covering the manager and webhooks. These tests are designed to fail when not run against clusters using Kind, and they avoid re-installing Prometheus and Cert-Manager if already present. See the final scaffolded tests in the samples under testdata here. Key improvements include:make manifestsandmake generateare run as part of the e2e tests. (#4122)make test-e2ewithmake testfor consistent behavior. (#4125)+kubebuilder:scaffold:e2e-webhooks-checksmarker. (#4121)e2e/test.go. (#4141, #4158, #4166, #4175)v1.14.4tov1.16.0for better compatibility and features. (#4209)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.