Update dependency kubernetes-sigs/kubebuilder to v4 #203
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.0
Release Notes
kubernetes-sigs/kubebuilder (kubernetes-sigs/kubebuilder)
v4.5.0
Compare Source
changes since v4.4.0
(go-v4): Upgrade controller-runtime from
v0.19.4
tov0.20.0
and 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.Validator
andwebhook.Defaulter
interfaces. Additionally, webhooks should no longer reside under theapi
directory. 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
apis
directory 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.0
tov0.17.1
(#4493)v1.62.2
tov1.63.4
(#4494)v1.16.0
tov1.16.3
(#4497)🐛 Bug Fixes
1.23.0
(#4491)docker.io
prefix for Docker Hub images (#4513)What's Changed
v1.16.0
tov1.16.3
by @camilamacedo86 in https://github.com/kubernetes-sigs/kubebuilder/pull/4497New Contributors
Full Changelog: kubernetes-sigs/kubebuilder@v4.4.0...v4.5.0
v4.4.0
Compare Source
changes since v4.3.1
✨ New Features
v1.61.0
tov1.62.2
(#4448)1.23
(#4446)controller-gen
fromv0.16.4
tov0.17.0
. (#4254, #4457)v0.19.1
tov0.19.4
(#4482)config/rbac
to 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.mod
for Go version management and automating ENVTEST versioning by retrieving the version directly fromgo.mod
, based on thecontroller-runtime
dependency in use. (#4385) (#4401)helm.kubebuilder.io/v1-alpha
plugin 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-alpha
is an experimental initial version. (More info)app.kubernetes.io/name
label 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.1
Compare Source
changes since v4.3.0
✨ New Features
controller-runtime
fromv0.19.0
tov0.19.1
. (#4234)kustomize
fromv5.4.3
tov5.5.0
(#4235)golangci-lint
fromv1.59
tov1.61
with minor adjustments for lint rules. (#4236)🐛 Bug Fixes
config/crd/patches
to ensure the/convert
service patch is only created for webhooks configured with--conversion
. (#4280)cmd/main.go
, providing clarity on secure metrics setup. (#4245)--make=false
option for webhook creation, ensuring consistency with other command options and improved flexibility. (#4275)cert-manager
uncomment block to the top ofkustomization.yaml
to enhance visibility (#4283)main.go
boilerplate 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.0
Compare Source
changes since v4.2.0
(Only projects using webhooks are impacted by)
Controller runtime has deprecated the
webhook.Validator
andwebhook.Defaulter
interfaces, and they will no longer be provided in future versions. Therefore, projects must adopt the newCustomValidator
andCustomDefaulter
interfaces to remain compatible with controller-runtimev0.20.0
and upper versions. For more details, refer to controller-runtime/issues/2641.Furthermore, webhooks should no longer reside under the
api
directory. 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 theCustomValidator
andCustomDefaulter
interfaces. 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.go
and other files. For example, update the import:Before:
After:
Replace Deprecated Interfaces with Custom Ones:
Replace
webhook.Validator
andwebhook.Defaulter
with the newCustomValidator
andCustomDefaulter
interfaces: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.Validator
andwebhook.Defaulter
interfaces withCustomValidator
andCustomDefaulter
. 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)APIPackagePathLegacy
method, which has been obsolete since release 4.0.0. This change cleans up unused code. (#4182)HasFragment
method, favoringHasFileContentWith
to 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 manifests
andmake generate
are run as part of the e2e tests. (#4122)make test-e2e
withmake test
for consistent behavior. (#4125)+kubebuilder:scaffold:e2e-webhooks-checks
marker. (#4121)e2e/test.go
. (#4141, #4158, #4166, #4175)v1.14.4
tov1.16.0
for 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.