Skip to content

Releases: kubernetes-sigs/kubebuilder

v4.2.0

17 Aug 09:41
c7cde51
Compare
Choose a tag to compare

changes since v4.1.1

⚠️ Important Notice:

The artefacts for ENVTEST from k8s 1.31 are exclusively available at: Controller Tools Releases. Kubebuilder no longer builds and promote the ENVTEST artefacts at the old location https://storage.googleapis.com/kubebuilder-tools which is deprecated and can no longer be ensured by Kubebuilder maintainers. You should ensure that your projects are using the new location. For further information, see: #4082

This update is fully transparent for Kubebuilder users assuming that they properly update their scaffolds to use setup-envtest from controller-runtime branch release-0.19.

# To know the available versions check: 
# - https://github.com/kubernetes-sigs/controller-tools/blob/main/envtest-releases.yaml
ENVTEST_K8S_VERSION = 1.31.0
# Controller-Runtime branch `release-0.19` has the implementation of the setup-envtest's code responsible
# for downloading the tarball from the correct location.
ENVTEST_VERSION ?= release-0.19

...
.PHONY: envtest
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
$(ENVTEST): $(LOCALBIN)
	$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION))

✨ New Features

  • (go/v4, kustomize/v2): Add support to protect project with network policies (#3853)
  • (go/v4): Add support to k8s 1.31 (#4080)
  • (go/v4): Upgrading controller-runtime from v0.18.4 to v0.19.0 (#4080)
  • (go/v4): Upgrading controller-tools from v0.15.0 to v0.16.1 (#4080)
  • (go/v4, kustomize/v2): Upgrade kustomize from v5.4.2 to v5.4.3 (#4084)

🐛 Bug Fixes

  • (go/v4): Add missing cancel context to controller's suite-test (#4067)
  • ⚠️ (Only relevant for users of Kubebuilder as a library): ImplementWebhooks should only be used by the e2e tests and should be under its package. Therefore, this method is no longer served under pkg/plugin/util (#4065)

What's Changed (Full Changelog)

New Contributors

Full Changelog: v4.1.1...v4.2.0

v4.1.1

23 Jul 07:10
e65415f
Compare
Choose a tag to compare

changes since v4.1.0

✨ New Features

  • (go/v4): Upgrade golangci-lint from v1.57.2 to v1.59.1 (#4030)
  • (go/v4): makefile: create unversioned symlinks for configurable binaries tools (#4013)
  • (kustomize/v2, go/v4): upgrade kustomize version from v5.4.1 to v5.4.2 (#4029)
  • (Only relevant for users of Kubebuilder as a library): Add new CLI option and allow access to underlying CLI command (#4011)

🐛 Bug Fixes

  • (go/v4): Fix security concerns by only enabling FilterProvider to protect the metrics endpoint with authn/authz when secureMetrics is true (#4022)
  • (go/v4): Align Go Version in go.mod Template to 1.22.0 (#4012)
  • (go/v4): Small cleanup in the main.go to keep all variables used defined on top of the file (#4036)
  • (go/v4): Fix golang documentation of the method LoadImageToKindClusterWithName scaffold in the e2e tests (#4034)
  • (go/v4): Fix validation used to ensure Kind versions pattern (#3986)
  • (kustomize/v2, go/v4): Add missing labels for config/default/manager_webhook_patch.yaml (#4028)

Note Based on the changes, it seems appropriate to release these updates as version 4.1.1 rather than 4.2.0. The new features are minor improvements which only affect new projects and do not introduce breaking changes or significant new functionality for existing users.

What's Changed (Full Changelog)

  • 🌱 Bump golang.org/x/tools from 0.22.0 to 0.23.0 by @dependabot in #4007
  • ✨ (Only relevant for users of Kubebuilder as a library) - Add new cli option and allow access to underlying cli command by @beatrausch in #4011
  • 🐛 Align Go Version in go.mod Template to 1.22.0 by @camilamacedo86 in #4012
  • 📖 Upgrade controller-gen used to generated the docs and remove redirects for artefact images by @camilamacedo86 in #4010
  • ✨ Makefile: Create Version-Agnostic Symlinks for Specified Versioned Binaries by @schrej in #4013
  • 📖 docs: correct typo in migration guide by @Gearheads in #4015
  • 📖 clarify in note that metrics are protected by default via controller-runtime feature by @camilamacedo86 in #4026
  • 📖 Update roadmap_2024.md - with the latest changes and by order the tasks adding what was done at the bottom of the page by @camilamacedo86 in #4027
  • 🐛 (kustomize/v2,go/v4): add missing labels for config/default/manager_webhook_patch.yaml by @camilamacedo86 in #4028
  • ✨ (kustomize/v2,go/v4): upgrade kustomize version from v5.4.1 to v5.4.2 by @camilamacedo86 in #4029
  • ✨ Upgrade golangci-lint from v1.57.2 to v1.59.1 by @camilamacedo86 in #4030
  • 🌱 Update release.yml - Update goreleaser from 1.11.2 to v2.1.0 by @camilamacedo86 in #4031
  • 🌱 Update Makefile - Remove makefile target to test legacy project no longer supported by @camilamacedo86 in #4032
  • 📖 Update test examples not to set Status on create by @hsadoyan in #4016
  • 🐛 Fix validation used to ensure Kind versions pattern by @Kavinjsir in #3986
  • 🐛 Fix golang documentation of the method LoadImageToKindClusterWithName scaffold in the e2e tests by @fengshunli in #4034
  • 🐛 Fix security concerns by only enabling FilterProvider to protect the metrics endpoint with authn/authz when secureMetrics is true by @alex-kattathra-johnson in #4022
  • 🐛 cleanup/enhancement: keep all variables used defined on top ofmain.go by @fengshunli in #4036
  • 🌱 fix error faced during release process by ensuring dist directory is cleaned before running GoReleaser by @camilamacedo86 in #4040
  • 🌱 Upgrade goreleaser by @camilamacedo86 in #4041

New Contributors

Full Changelog: v4.1.0...v4.1.1

v4.1.0

05 Jul 09:07
de1cc60
Compare
Choose a tag to compare

changes since v4.0.0

✨ New Features

This protection is similar to what was previously done via kube-rbac-proxy, which usage was discontinued in the project. Please, ensure that you no longer use the image gcr.io/kubebuilder/kube-rbac-proxy. ⚠️ Images provided under gcr.io/kubebuilder/ will be unavailable from March 18, 2025.

  • Upgrade controller-runtime from v0.18.2 to v0.18.4 (#3957) (#3972)
  • Add revive golangci linter with comment-spacings rule (#3960)
  • (Only relevant for users of Kubebuilder as a library) Allow usage of custom marker names (#3993)

🐛 Bug Fixes

  • Corrected the generate command to respect the --namespaced=false flag for APIs. (#3970)

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

New Contributors

Full Changelog: v4.0.0...v4.1.0

v4.0.0

24 May 08:36
6c08ed1
Compare
Choose a tag to compare

v4.0.0

changes since v3.15.1

Overview and Key Guidelines

It is a MAJOR release because all deprecated features were removed from the project. However, for those with projects scaffolded using the go/v4 plugin layout, there should mainly not be impacted by. To know the layout version of your project, check the Project Config, see the PROJECT file (example).

(General guidance) You might be impact by:

(For who are using go/v2 or go/v3) Upgrading Layouts:

If your project is currently using go/v2 or go/v3, you must upgrade to go/v4 to be compatible with this release and future updates. To know how to upgrade, check the migration documentation.

💡 Tips

You can add the changes manually, but unless your project is too big or deviated too much from the proposed layout the recommended process to upgrade a project usually involves re-scaffolding and then comparing the new base with your project code changes and re-adding all on top. IDEs usually can help you out in this process since you can re-scaffold all in a branch and easily compare it with your main branch published in the repository of your project to add the code back again.

  • Kubebuilder provides and Upgrade Assistance for those who have been using the CLI to do all scaffolds and does not deviated from the layout proposed.
  • You can follow the same process to ensure that your scaffold has all changes and bug fixes introduced from MINOR releases.
  • You can also always check the project scaffolds under the testdata directory as a base and compare them across tag releases to check the changes made: Example: Compare testdata/project-v4 between tags v3.14.1 and v3.15.1.
  • Avoiding unnecessary deviations from the proposed layout can help you keep your project maintained and aligned with the latest changes with a lower effort. Please, see the info.

⚠️ Breaking Changes

  • Removal of ComponentConfig since it is no longer supported by controller-runtime release version 0.15.0 and was removed from v0.18.0 (#3764). (More info)
  • Removal of the go/v2 which was kept only to ensure backwards compatibility from Kubebuilder release 2x to 3x and is deprecated since Apr 28, 2021. The go/v2 plugin cannot scaffold projects in which CRDs and/or Webhooks have a v1 API version. Be aware that v1beta1 API for CRDs and Webhooks was deprecated on Kubernetes 1.16 and were removed in the Kubernetes 1.22+ release. Go versions higher than 1.13+ are not supported within. (#3763) (#3915) (More info).
  • Removal of the go/v3 which is deprecated since Mar 11, 2023. Be aware that go/v3 plugin cannot scaffold projects using kustomize versions v4x+ and cannot fully support Kubernetes 1.25+ and go versions higher than 1.19+. (#3763) (#3915) (More info)
  • Removal of the kustomize/v1 which is deprecated since Mar 11, 2023. (#3763) (#3915) (More info)
  • Removal of the Declarative Plugin. (#3922) (More info)
  • (For who consume Kubebuilder as lib): Removal of deprecated APIs. The methods NewBundle, GetShortName, IsLegacyLayout are no longer available for those that consumes Kubebuilder as lib. (#3929)

✨ New Features

  • Add support for go 1.22 (#3910)
  • Add support for Kubernetes version 1.30. Upgrade controller-runtime from v0.17.3 to v0.18.2 (#3912)
  • Upgrade kustomize from v5.3.0 to v5.4.1 by (#3911)
  • Upgrade controller-tools from v0.14.0 to v0.15.0 (#3913)
  • Upgrade EnvTest from 1.29.0 to 1.30.0 (#3914)
  • Add new GolangCI linter to check the tests scaffolded with ginkgo (#3894)
  • (For who consume Kubebuilder as lib): Add sigs.k8s.io/kubebuilder/v4 module (#3924)

🐛 Bug Fixes

  • Fix typo issue in the flag description (#3954)
  • Fix in the makefile target docker-buildx to use the project name instead of fix value (#3928)
  • Fix in the makefile to remove invalid comment (#3816)
  • Fix to ensure consistent spacing in marker annotations. Ensure that you replace all markers to add the space by s/\//+/\// +/. (#3904)

Thanks to all our contributors!

What's Changed (Full Changelog)

Read more

v3.15.1

23 May 19:02
01f76cf
Compare
Choose a tag to compare

v3.15.1

changes since v3.15.0

🐛 Bug Fixes

  • (go/v4,kustomize/v2): - fix to preserve existing flags when applying metrics patch (#3947)
  • (go/v4,kustomize/v2): - fix the place where metrics service is scaffolded by moving from config/rbac to config/default (#3948)

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

  • 🐛 (cherry-pick #3937) - fix: preserve existing flags when applying metrics patch by @camilamacedo86 in #3947
  • 🐛 (cherry-pick #3945) fix place where metrics service is scaffolded by moving from config/rbac to config/default by @camilamacedo86 in #3948

Full Changelog: v3.15.0...v3.15.1

v3.15.0

15 May 10:16
c01af8f
Compare
Choose a tag to compare

v3.15.0

changes since v3.14.2

⚠️ Breaking Changes

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

  • 📖 Fix link for controller-runtime FAQ by @camilamacedo86 in #3888
  • 🌱 Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 by @dependabot in #3891
  • 🌱 Bump golangci/golangci-lint-action from 4 to 5 by @dependabot in #3892
  • 🌱 Bump sigs.k8s.io/kubebuilder/v3 from 3.14.1 to 3.14.2 in /docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1 by @dependabot in #3893
  • 🌱 Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 by @dependabot in #3900
  • 🌱 Bump golang.org/x/tools from 0.20.0 to 0.21.0 by @dependabot in #3901
  • 🌱 move tony to approver by @Kavinjsir in #3843
  • 🌱 Bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 by @dependabot in #3905
  • 🌱 Bump golangci/golangci-lint-action from 5 to 6 by @dependabot in #3906
  • ⚠️ Discontinue Kube RBAC Proxy in Default Kubebuilder Scaffolding by @camilamacedo86 in #3899

Full Changelog: v3.14.2...v3.15.0

v3.14.2

27 Apr 08:26
d7b4feb
Compare
Choose a tag to compare

v3.14.2

changes since v3.14.1

✨ New Features

  • (go/v4): Upgrade controller-runtime dependency from v0.17.2 to v0.17.3 (#3882)
  • (go/v4): Upgrade golangci from 1.54 to 1.57 by (#3846)
  • (go/v4): (To address deprecation): Replace deadline in favor of timeout in golangci-lint configuration (#3865)
  • (kustomize/v2): Add CRD viewer and editor roles in rbac/kustomization.yaml (#3800)
  • (go/v4): Upgrade cert-manager version used from v1.5.3 to v1.14.4 in the e2e tests scaffolded (#3839)
  • (go/v4): Upgrade Prometheus version used in the tests from v0.68.0 to v0.72.0 in the e2e tests scaffolded (#3840)
  • (go/v4): Upgrade gcr.io/kubebuilder/kube-rbac-proxy image from v0.15.0 to v0.16.0 (#3833).

⚠️ IMPORTANT: Please note that kube-rbac-proxy is now deprecated and will be discontinued in a future release.

If you want to still using this project, it is recommended that you switch to the images directly provided by the project. For more details, please refer to the project’s image repository.

The Kubebuilder can no longer support the promotion and building of these images. All images previously built and promoted will no longer be available starting April 22, 2025. This change may impact your production workloads if they rely on these images. (gcr.io/kubebuilder/kube-rbac-proxy:<all>)

For more information, please review the proposal to Discontinue Kube RBAC Proxy in Default Kubebuilder Scaffolding.

🐛 Bug Fixes

  • (go/v4): Add comment to clarify that webhooks path in the marker values should not be changed (#3877)
  • (go/v4): Fix Invalid leader election ID generated when domain is empty (#3876)
  • (kustomize/v2, go/v4): Fix labels according to conventions. Follow-up of PR 3797 (#3857)
  • (go/v4,kustomize/v2): Fix roles names for projects with multi-group layout (#3845)
  • (go/v4,kustomize/v2): Fix the CRD kustomization path logic to ensure webhook patches are generated exclusively for resources that are configured with webhooks (#3838)
  • (go/v4,kustomize/v2): Fix resource path generation for resources without a specified group (#3837)
  • (kustomize/v2, go/v4): Fix labels according to conventions. Address change in missing files. It is a follow-up of the PR #3797 (#3857)

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

New Contributors

Full Changelog: v3.14.1...v3.14.2

v3.14.1

30 Mar 09:26
cc338d7
Compare
Choose a tag to compare

v3.14.1

changes since v3.14.0

✨ New Features

  • (go/v4): Upgrade controller-runtime from v0.17.0 to v0.17.2 (#3827)

🐛 Bug Fixes

  • (go/v4): Remove trailing whitespace from Readme which is scaffold for the project (#3813)
  • (go/v4): Fix compatibility issues encountered while setting up EnvTest binaries by using the controller-runtime branch releases (#3824).
  • (kustomize/v2, go/v4, deploy-image/v1-alpha): Fix labels according to conventions and conveys. app.kubernetes.io/name now have the ProjectName and the labels app.kubernetes.io/instance, app.kubernetes.io/component, app.kubernetes.io/created-by, app.kubernetes.io/part-of were removed (#3797)
  • (go/v4): Fix makefile target build-installer to discarding the previous content (#3766)
  • (go/v4): Fix scaffolding e2e template by adding missing errors checks (#3786)
  • (go/v4): Fix makefile target build-installer to discarding the previous content (#3766)
  • (go/v4): Fix rules to allow create new APIs by reverting the PR( #3742 ) (#3787)

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

  • 📖 docs updates for external types and submodule-layouts by @jakobmoellerdev in #3055
  • 🐛 (go/v4) Fix makefile target build-installer to discarding the previous content by @lukas016 in #3766
  • 📖 Clean up getting started docs by @stmcginnis in #3758
  • 📖 Update Contrbuting.MD by @camilamacedo86 in #3769
  • 📖 Fix #the reference link by @wastelife in #3771
  • 📖 Simplify if condition in cronjob tutorial by @lpugoy in #3765
  • 📖 Typo multi-version tutorial deployment.md by @tatehanawalt in #3770
  • 📖 Fix typo in cronjob-tutorial by @awalvie in #3773
  • 🌱 Bump sigs.k8s.io/kubebuilder/v3 from 3.13.0 to 3.14.0 in /docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1 by @dependabot in #3774
  • 🌱 Bump golangci/golangci-lint-action from 3 to 4 by @dependabot in #3778
  • 📖 Add context to handler func by @vladfr in #3777
  • 🌱 Bump golang.org/x/tools from 0.17.0 to 0.18.0 by @dependabot in #3779
  • 🐛 Revert ":bug: Align CRD version validation with apiextensions" by @camilamacedo86 in #3787
  • 🐛 scaffolding e2e template err check by @domcyrus in #3786
  • 📖 Specify what is run and deployed by @letthefireflieslive in #3788
  • 📖 Add the Admission webhooks link in docs/book/src/reference/admisson-webhook.md by @renormalize in #3799
  • 🐛(kustomize/v2, go/v4, deploy-image/v1-alpha): Fix labels according to conventions and conveys. app.kubernetes.io/name now have the ProjectName and the labels app.kubernetes.io/instance, app.kubernetes.io/component, app.kubernetes.io/created-by, app.kubernetes.io/part-of were removed by @sarthaksarthak9 in #3797
  • 🌱 Bump github.com/onsi/gomega from 1.31.1 to 1.32.0 by @dependabot in #3820
  • 🐛 Fix compatibility issues encountered while setting up envtest by using the controller-runtime branch releases (unblock CI) by @camilamacedo86 in #3824
  • 📖 : (README) Fix slack channel access address by @uos-ljtian in #3818
  • 🐛 fix make build-installer command to remove CRD duplication by @mateusoliveira43 in #3814
  • 🐛 fix: Remove empty line at beginning of generated files by @mateusoliveira43 in #3815
  • 📖 Fix typo issue in the docs by @mcbenjemaa in #3803
  • 📖 Add missing basic-project-doc link by @semihbkgr in #3806
  • 🌱 Add prefix to bot PR title to respect community rule by @Kavinjsir in #3810
  • 🌱 Bump golang.org/x/tools from 0.18.0 to 0.19.0 by @dependabot in #3817
  • 🌱 Bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.17.1 by @dependabot in #3822
  • 🌱 Remove trailing whitespace in readme gen by @bzub in #3813
  • 🌱 Remove trailing spaces in the docs and add check as automate fix to the make generate by @camilamacedo86 in #3826
  • ✨ Upgrade controller-runtime from v0.17.0 to v0.17.2 by @camilamacedo86 in #3827

New Contributors

Full Changelog: v3.14.0...v3.14.1

v3.14.0

30 Jan 09:29
1105363
Compare
Choose a tag to compare

changes since v3.13.0

✨ New Features

  • (go/v4): Upgrade dependencies to Support k8s 1.29 ( #3749 )
    • Upgrade from k8s 1.28 to 1.29
    • Upgrade controller runtime from 0.16.13 to 0.17.0
    • Upgrade controller tools from 0.13.0 to 0.14.0
  • (kustomize/v2, go/v4): Upgrade kustomize from v5.2.1 to v5.3.0 ( #3751 )
  • (CLI, go/v4) - Add support to go 1.21 ( #3745 )
  • (go/v4): Add tests for the webhooks and controllers which are created so that the suite test is no longer ignored ( #3631 )
  • (go/v4): Add e2e tests scaffolded in default layout( #3670 )
  • (go/v4): Ensure versioning of tools and binaries installed via Makefile ( #3718 )
  • (CLI - Binary) - Start to build CLI binary for Linux s390x ( #3741 )
  • (go/v4): Add method to allow users to distribute the project ( #3626 )
  • Change Kind (CRD) version validation to use the same API extensions validation to be more permissive ( #3742 )

🐛 Bug Fixes

  • (go/v3, go/v4) Disable HTTP2 for webhook server and metrics to address CVE-2023-39325 HTTP/2 rapid reset can cause excessive work in net/HTTP ( #3734 )
  • (go/v4): Fix make help instruction in the README ( #3719 )
  • (go/v4): Fix comments and typo issues in the .gitignore ( #3717 )
  • (go/v4): Standardize 'AS' Keyword Capitalization in Dockerfile for Clarity ( #3727 )

🎉 Thanks to all our contributors!

What's Changed (Full Changelog)

New Contributors

Full Changelog: v3.13.0...v3.14.0

v3.13.0

02 Nov 20:43
c8a7cc5
Compare
Choose a tag to compare

changes since v3.12.0

✨ New Features

  • Upgraded controller-runtime from v0.16.0 to v0.16.3 ( #3597, #3625, #3665 )
  • Added golangci integration to the default scaffold ( #3600 )
  • Allowed customization of golangci-lint version in the Makefile ( #3642 )
  • Upgraded k8s version from v0.28.1 to v0.28.3 to address CVE-2023-44487 ( #3665 )
  • Upgraded kustomize version from v5.1.1 to v5.2.1 ( #3661 )
  • Upgraded gcr.io/kubebuilder/kube-rbac-proxy container image version from v0.14.1 to v0.15.0 ( #3665 )

🐛 Bug Fixes

  • Disabled log timestamp ( #3619 )
  • Fixed readme content and instructions ( #3628 )
  • Fixed yamllint warnings in the scaffolds done under config ( #3634 )
  • Fixed uncomment kustomize files config accordingly when webhooks are generated ( #3629 )
  • Fixed role and kustomize build when no CRDs are added to the project ( #3627 )
  • Stopped generating crd webhooks patches and injections for any CRD/API and projects without webhooks ( #3647 )
  • Removed the use of deprecated patchesStrategicMerge ( #3661 )

Thanks to all our contributors!

What's Changed

New Contributors

Full Changelog: v3.12.0...v3.13.0