github kubernetes-sigs/kubebuilder v4.12.0

10 hours ago

πŸš€ Keep Your Scaffold Updated

The migration guide covers upgrading from any version to the latest, including AI-assisted helpers/commands for legacy scaffolds that may require manual steps. For the smoothest path, enable the AutoUpdate Plugin (uses GitHub Actions) or run kubebuilder alpha update locallyβ€”both use the same update logic. The other options are primarily for older projects missing cliVersion in the PROJECT file as a one-time step to reach a supported version; after that, you can rely on these workflows for ongoing updates.

✨ Upgrades

  • (go/v4): upgrade golangci-lint from v2.7.2 to v2.8.1. (#5403, #5481)
  • (go/v4): Upgrade certmanager from v1.19.2 to v1.19.3. (#5431)
  • (go/v4): Upgrade controller-tools from v0.20.0 to v0.20.1 (#5475)
  • (kustomize/v2): Upgrade kustomize from 5.7.1 to 5.8.1. (#5412, #5481)

✨ New features

  • (helm/v2-alpha): Polish Chart.yaml metadata. (#5414)
  • (helm/v2-alpha): Add Notes.txt. (#5392)
  • (helm/v2-alpha): Add Makefile targets for Helm Development. (#5442,#5468)
  • (go/v4): Add autocomplete support in .devcontainer/post-install.sh and enhance script. (#5394, #5435)
  • (go/v4): Add custom k8s linter for logs to promote better observability. (#5396)
  • (go/v4): Now, users can scaffold projects which are namespace-scoped managers by using the flag --namespaced. The flag is valid for init and edit subcommands (#5411, #5482, #5480)
  • (go/v4): add --multigroup flag to init subcommand. Now you can initialize a project with this layout (#5440)
  • (CLI): Add short description to tab completion in bash . (#5408)
  • (alpha/update): Add the flag --merge-message and flag --conflict-message to allow customise commit messages. (#5429, #5479)

πŸ› Bug fixes

  • (go/v4): Follow Kubernetes logging conventions. (#5406)
  • (go/v4): Make e2e tests more robust to avoid flakes (#5437, #5450)
  • (helm/v2-alpha): wrap webhook resources with .Values.webhook.enable conditional. (#5413)
  • (helm/v2-alpha): Fix chart generation and template rendering issues. (#5422)
  • (helm/v2-alpha): Support custom container names and fix templating bugs (#5463)
  • (helm/v2-alpha): Fix crd.keep to correctly add the helm.sh/resource-policy: keep annotation to generated CRDs (#5472)
  • (helm/v2-alpha): remove deprecated helm/v1-alpha plugin entry from PROJECT file when helm/v2-alpha is used. (#5436)
  • (CLI): alpha generate/update now respects the custom project name. (#5426)
  • (alpha/update): update commit messages with conventional commit format. (#5428)
  • (CLI/API): Fix issues when the --help command was used with --plugins and improve output to show the available help plugins per subcommand. (#5448)
  • (API): move hack/docs/utils to hack/docs/internal. (#5407)

πŸŽ‰ Thanks to all contributors!

What's Changed ( Full Changelog )

  • ✨ (go/v4): upgrade golangci-lint from v2.7.2 to v2.8.0 by @camilamacedo86 in #5403
  • πŸ“– (docs): Clarify PR title and commit message format guidelines by @camilamacedo86 in #5393
  • ✨ (go/v4): Add autocomplete support in .devcontainer/post-install.sh by @camilamacedo86 in #5394
  • πŸ› fix(api): move hack/docs/utils to hack/docs/internal by @vitorfloriano in #5407
  • πŸ“– docs(externalPluginSample): Improve external plugin sample with tests and validation by @camilamacedo86 in #5398
  • ✨ feat(cli): add short description to tab completion in bash by @vitorfloriano in #5408
  • πŸ› (go/v4): Follow Kubernetes logging conventions by @camilamacedo86 in #5406
  • πŸ“– Add webhook bootstrap problem guide and warning by @camilamacedo86 in #5395
  • ✨ (go/v4): Add custom k8s linter for logs to promote better observability by @camilamacedo86 in #5396
  • 🌱 (agents.md): enhance the AI instructions for Kubebuilder logging by @camilamacedo86 in #5410
  • ✨ (kustomize/v2): Upgrade kustomize from 5.7.1 to 5.8.0 by @camilamacedo86 in #5412
  • πŸ› (helm/v2-alpha): wrap webhook resources with .Values.webhook.enable conditional by @camilamacedo86 in #5413
  • πŸ“– Bump github.com/onsi/ginkgo/v2 from 2.27.5 to 2.28.1 in /docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1 by @dependabot[bot] in #5420
  • πŸ“– Bump github.com/onsi/gomega from 1.39.0 to 1.39.1 in /docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1 by @dependabot[bot] in #5418
  • 🌱 Bump github.com/onsi/gomega from 1.39.0 to 1.39.1 by @dependabot[bot] in #5417
  • 🌱 Bump github.com/onsi/ginkgo/v2 from 2.27.5 to 2.28.1 by @dependabot[bot] in #5419
  • πŸ“– (docs/infra): Update mdBook version to v0.5.2 by @ottnorml in #5421
  • πŸ› CLI release version): Preserve clean version tags in GoReleaser builds by @camilamacedo86 in #5424
  • πŸ› (helm/v2-alpha): Fix chart generation and template rendering issues by @camilamacedo86 in #5422
  • πŸ› fix(alpha): respect custom project name in generate command by @camilamacedo86 in #5426
  • πŸ› (alpha/update): update commit messages with conventional commit format by @camilamacedo86 in #5428
  • πŸ› fix(CLI): Fix logs to follow best practices by @camilamacedo86 in #5409
  • 🌱 Fix lint issue - size of message by @camilamacedo86 in #5432
  • ✨ Upgrade certmanager from v1.19.2 to v1.19.3 by @camilamacedo86 in #5431
  • ✨ (alpha/update): add flags for custom commit messages by @camilamacedo86 in #5429
  • 🌱 test(e2e): centralize test helpers and optimize test execution by @camilamacedo86 in #5427
  • ✨ (helm/v2-alpha): polish Chart.yaml metadata by @camilamacedo86 in #5414
  • ✨ (helm/v2-alpha): Add Notes.txt by @camilamacedo86 in #5392
  • πŸ› (helm/v2-alpha): remove deprecated v1-alpha plugin entry from PROJECT file by @camilamacedo86 in #5436
  • πŸ› fix(go/v4): Add retry to flaky metrics E2E test by @camilamacedo86 in #5437
  • ✨(go/v4): enhance devcontainer post-install script by @camilamacedo86 in #5435
  • πŸ“– : remove misleading comment from install script by @orangecms in #5439
  • ✨ (go/v4): Add --namespaced flag for namespace-scoped managers by @camilamacedo86 in #5411
  • 🌱 (e2e/docs): Update certmanager to v1.19.3 and prometheus to v0.85.0 by @camilamacedo86 in #5441
  • πŸ› fix(CLI/API) prevent --help from being validated as plugin name by @camilamacedo86 in #5448
  • πŸ› fix(go/v4): Add more checks for webhooks in e2e tests to avoid flakes by @camilamacedo86 in #5450
  • 🌱 fix(e2e): consolidate test suites to reduce execution time by @camilamacedo86 in #5454
  • πŸ“– docs: add note on limitations to CRD validation markers reference by @orangecms in #5438
  • 🌱 docs/book: fix the install script by @orangecms in #5455
  • ✨ (helm/v2-alpha): Add Makefile targets for Helm Development by @camilamacedo86 in #5442
  • 🌱 Bump golang.org/x/tools from 0.41.0 to 0.42.0 by @dependabot[bot] in #5460
  • ✨ (helm/v2-alpha): Add Helm chart tests and call in the GitHub action to validate the chart by @camilamacedo86 in #5415
  • πŸ“– CONTRIBUTING: reference mdBook's advanced Markdown format by @orangecms in #5464
  • πŸ› (helm/v2-alpha): Support custom container names and fix templating bugs by @AlirezaPourchali in #5463
  • 🌱 Bump k8s.io/apimachinery from 0.35.0 to 0.35.1 by @dependabot[bot] in #5467
  • ✨ (go/v4): add --multigroup flag to init command by @camilamacedo86 in #5440
  • 🌱 Update external plugin sample Go deps by @camilamacedo86 in #5469
  • 🌱 refactor(kustomize/v2): follow Go logging conventions for webhook warning by @camilamacedo86 in #5470
  • ✨ feat(helm/v2-alpha): Add install-helm target and upgrade to Helm 4 by @camilamacedo86 in #5468
  • πŸ› (helm/v2-alpha): Fix crd.keep to correctly add the helm.sh/resource-policy: keep annotation to generated CRDs by @asergeant01 in #5472
  • πŸ› fix(helm/v2-alpha): remove issues to pre-load image by @camilamacedo86 in #5477
  • ✨ chore(go/v4): Upgrade controller-tools from v0.20.0 to v0.20.1 by @camilamacedo86 in #5475
  • ⚠️ (helm/v2-alpha): remove helm test added (reverts pre-release addition to be safe) by @camilamacedo86 in #5478
  • ✨ refactor(alpha/update): shorten commit message flag names by @camilamacedo86 in #5479
  • ✨ (kustomize/v2) Upgrade kustomize from 5.8.0 to 5.8.1 by @camilamacedo86 in #5481
  • 🌱 chore(e2e): Increase timeout from 40m to 60m by @camilamacedo86 in #5483
  • πŸ› (go/v4): preserve existing PROJECT values for unset edit flags by @camilamacedo86 in #5480
  • ✨ (go/v4): Add webhook scope mismatch warning for namespace-scoped mode by @camilamacedo86 in #5482

New Contributors

Full Changelog: v4.11.1...v4.12.0

Don't miss a new kubebuilder release

NewReleases is sending notifications on new releases.