Update dependency kubernetes-sigs/kubebuilder to v4.16.0 - #256
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
January 27, 2026 18:06
f3dd836 to
ad0a4ae
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
2 times, most recently
from
February 16, 2026 15:06
29cc823 to
bf48df1
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
February 27, 2026 14:40
bf48df1 to
fb0abfb
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
February 27, 2026 17:05
fb0abfb to
09240c2
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
March 25, 2026 12:38
09240c2 to
b131c30
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
April 30, 2026 09:46
b131c30 to
9594c07
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
May 14, 2026 17:00
9594c07 to
84fe4be
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
June 15, 2026 10:48
84fe4be to
807edf2
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
September 7, 2026 20:43
807edf2 to
beeff04
Compare
renovate
Bot
force-pushed
the
renovate/kubernetes-sigs-kubebuilder-4.x
branch
from
September 10, 2026 13:12
beeff04 to
8ec7771
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:
v4.10.1→v4.16.0Release Notes
kubernetes-sigs/kubebuilder (kubernetes-sigs/kubebuilder)
v4.16.0Compare Source
🚀 Automation to Upgrade your Project
The migration guide covers upgrading from any supported version to the latest release.
For the smoothest upgrade path, use the AutoUpdate Plugin or run
kubebuilder alpha update. Both use the same update logic: they regenerate your project from scratch, reapply your changes, and bring in everything listed below. Your PROJECT file needscliVersionfor this to work.Other upgrade options are mainly intended for older projects that do not yet have
cliVersionin their PROJECT file. These are the paths in the migration guide: follow the AI instructions, or make the changes by hand, to re-scaffold your project with the latest version and put your own changes back on top. Use them as a one-time step to reach a supported version, then continue using these update workflows.❗Recommended Scaffold Fixes to Apply
These are not breaking changes but are significant bug fixes. If you upgrade with
alpha updateor the AutoUpdate Plugin, you get them automatically. Apply them by hand only if you update your project manually.Fix the default webhook names to align with the controller-runtime interfaces
Applies to projects with webhooks. The generated webhook structs were renamed. #5877
<Kind>CustomDefaulteris now<Kind>Defaulter, and<Kind>CustomValidatoris now<Kind>Validator.To apply this by hand, open
internal/webhook/<version>/<kind>_webhook.goand rename both types. Then update three more places: the method receivers, theWithDefaulterandWithValidatorcalls inSetup<Kind>WebhookWithManager, and<kind>_webhook_test.go.If you skip it: nothing breaks. Your code still compiles and runs. But the next webhook you add with
create webhookuses the new names, so one project ends up with both<Kind>CustomValidatorand<Kind>Validator.Fix the
envtestsuite teardownApplies to every project with an API or a webhook.
AfterSuiteno longer retriestestEnv.Stop(). #5838The teardown used to run inside
Eventually, which kept retrying after aSIGKILL. That hid real shutdown failures. Kubebuilder now checks the result once.To apply this by hand, replace the
AfterSuitebody insuite_test.goandwebhook_suite_test.gowith:Suites that passed before may now fail. The failure was always there. The retry only hid it.
If you skip it: your tests keep passing, and that is the problem. A failing
testEnv.Stop()is retried away instead of reported, so a control plane that did not shut down leaveskube-apiserverandetcdprocesses behind without telling you.Fix the webhook NetworkPolicy
Applies to every project. It matters most if you uncommented
- ../network-policyinconfig/default/kustomization.yaml. The webhook NetworkPolicy was fixed. #5905The old policy allowed traffic on port
443, and only from namespaces labeledwebhook: enabled. Two things were wrong with that. Port443is the Service port, not the port the manager listens on. And the API server does not run in a labeled namespace. So turning the policy on blocked every webhook call.To apply this by hand, replace the
ingressblock inconfig/network-policy/allow-webhook-traffic.yamlwith:If you set
--webhook-port, use your own port instead of9443. You can also remove thewebhook: enabledlabel from your namespaces, because nothing uses it now.To limit which namespaces a webhook applies to, use
namespaceSelectorinstead. This release ships controller-toolsv0.22.0, which adds apatchoption to the webhook marker, so you can set the selector in your code (controller-tools#1339):// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,...,patch=`{"namespaceSelector":{"matchLabels":{"webhook-enabled":"true"}}}`Run
make manifeststo regenerate yourMutatingWebhookConfigurationandValidatingWebhookConfiguration.If you skip it: on a cluster whose CNI does not enforce NetworkPolicy, nothing changes. On one that does, such as Calico or Cilium, enabling the policy blocks webhook traffic: the rule allows pod port
443, but the manager listens on9443. Either way, thewebhook: enabledlabel gave a false sense of protection. NetworkPolicy cannot decide which namespaces a webhook applies to — onlynamespaceSelectorin the webhook configuration can.What's Changed
Only for projects using the AutoUpdate plugin (
autoupdate/v1-alpha)GitHub Models support has been removed. #5777
Update the plugin and review the changes:
Only for projects using the Helm plugin (
helm/v2-alpha)Two chart values are now required. Without them, your chart fails to render.
Upgrade your project using
alpha updateor alternatively, regenerate the chart with:New values are not added automatically. Add them manually by comparing your chart with the
v4.16.0sample values file.Three changes need your attention:
manager.healthProbe.portis new, and the chart has no default for it. If you do not add it, the chart fails to render withnil pointer evaluating interface {}.port. Add it undermanager: #5866, #5888serviceAccount.nameis now required when you setserviceAccount.enabled: false. Before, the chart rendered and pointed at a ServiceAccount that did not exist. Now it fails instead. Set a name, or usename: defaultto use the namespace default ServiceAccount. #5833manager.argsthrough thetplfunction. If an argument contains{{ }}, Helm evaluates it as a template. Before, it passed the argument through as plain text. #5927Only for projects with webhooks under
api/<version>/The deprecated
--legacyflag has been removed. Projects already usinginternal/webhook/<version>/are not affected. #5837Move your webhooks from
api/<version>/tointernal/webhook/<version>/and update them to use interfaces compatible with controller-runtimev0.20.0and later. Follow the migration guide with AI instructions.✨ Upgrades
v1.20.2tov1.21.1(#5799, #5861, #6000)v2.13.1, and replace the deprecatedRequeuefield withRequeueAfterin the scaffolds and the docs (#5992)v0.21.0tov0.22.0(#6025)v0.24.1tov0.25.0(#6026)k8s.io/*dependencies fromv0.36.0tov0.37.0, makeskubebuilder versionreport Kubernetes1.37.0, and runs the end-to-end tests against KINDv1.37.0(#6027)✨ New Features
create api --ssa. See Server-Side Apply (#5458, #5829, #5840, #5939, #6024)BASE_IMAGEbuild argument (#5915)namespaceSelectorandobjectSelectordirectly from the+kubebuilder:webhook:marker, using the newpatchoption that comes with controller-toolsv0.22.0(controller-tools#1339)manager.healthProbe.port(#5866, #5888) — see Breaking Changesmanager.argsvalues (#5927) — see Breaking Changes🐛 Bug Fixes
<Kind>CustomDefaulterand<Kind>CustomValidatorto<Kind>Defaulterand<Kind>Validator, and correct the comments that name the interfaces they implement (#5877) — see Recommended Scaffold Fixesnew(expr)syntax in generated code instead ofk8s.io/utils/ptr, and stop turning off thenewexprcheck in the generated.golangci.yml(#5775)envtestshutdown failures instead of hiding them behind retries (#5838) — see Recommended Scaffold Fixescreate webhookfor an external API. Kubebuilder now reuses the configuration already recorded inPROJECT, matches on Group, Version and Kind because the caller does not know the domain, and lets you pick with--external-api-domainwhen more than one recorded resource matches (#5792, #5917, #5932).dockerignore, so you can find the workaround when a Podman build fails (#5887, #5914)YEARplaceholder only when it stands alone, so words that containYEARare left alone (#5809)make helm-deployuse the controller image you configured (#5765)prometheus.enabledfrom the generated kustomize output, instead of always setting it tofalse(#5913)--metrics-secureargument through to the chart'smetrics.securevalue. See Metrics (#5951)alpha updatecreates, including when it fails (#5705, #5830)PROJECTfile only for the commands that need it.version,help, andcompletionnow work even when the current directory holds an invalidPROJECTfile (#5845, #5942, #6030)alpha generateoutput directory without calling the shell, which removes a shell injection risk (#5920)alpha generatefrom deleting the current directory when you use--input-dirwithout--output-dir. It now regenerates the project in place (#5957)alpha generateruns in place (#5968)PROJECTtogo.kubebuilder.io/v4.go/v3-alphaused to becomego/v4-alpha, which does not exist, becausego/v3matched first.go/v4-alphais now retired too (#6023)Full Changelog and New contributors
What Changed
legacywebhook flag introduced to help users migrate to the new layout where webhooks are under internal path by @hexbinoct in #5837create api --ssawarns and continues when markers cannot be injected, with more robust file updates and better test coverage. by @camilamacedo86 in #5840prometheus.enabledin the generated chart now reflects the kustomize output (true when a ServiceMonitor is present) instead of always defaulting to false. by @camilamacedo86 in #5913manager.argsvalues to be templated by @asergeant01 in #5927alpha generatedeleting the current working directory when--input-dirwas used without--output-dir. It now regenerates the project directory it read from. by @camilamacedo86 in #5957Configuration
📅 Schedule: (in timezone Asia/Tokyo)
🚦 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.