Releases: kubernetes-sigs/kubebuilder
Release v3.6.0
changes since v3.5.0
✨ New Features
- (go/v3, go/v4-alpha): upgrade gcr.io/kubebuilder/kube-rbac-proxy from v0.12.0 to v0.13.0 (#2803)
- (kustomize/v2-alpha): remove unnecessary varReference for setup cert-manager (#2794)
- (go/v3, go/v4-alpha): upgrade k8s deps from 1.24 to 1.24.2, controller-tools from v0.9.0 to v0.9.2 and controller-runtime from v0.12.1 to v0.12.2 (#2791)
- (for external plugins/phase 2 plugins): enable external plugins to specify metadata and examples (#2780)
Add a new plugin (grafana/v1-alpha)
The Grafana plugin is an optional plugin that can be used to scaffold Grafana Dashboards to allow you to check out the default metrics which are exported by projects using controller-runtime.(More info)
- add a new dashboard to show CPU and Memory usage for Pods (#2797)
- add workqueue panels to the dashboard (#2834)
- Initialize the Grafana plugin (#2718)
Add a new plugin (deploy.image/v1-alpha)
The deploy-image plugin allows users to scaffold API/Controllers to deploy and manage an Operand (image) on the cluster following the guidelines and best practices. It abstracts the complexities of achieving this goal while allowing users to customize the code generated. (More info)
- add code for updating controller status when the deployment is created successfully (#2816)
- small improvements on the controller scaffold (#2831)
- improve controller-test reconciliation (#2830)
- add validation markers for size spec (#2825)
- made corrections in the controller_test.go scaffolds (#2818)
- change labels to follow the standards (#2813)
- add env var for storing the image name (#2817)
- add finalizers for the Custom Resource created (#2793)
- improve the variable name used (#2806)
- add tests for the controller using ENV TEST (#2792)
- adding a run-as-user flag for specifying user-id. (#2779)
- fix the track of options in the PROJECT file (#2776)
- add the new deploy-image/v1-alpha plugin (#2717)
- trim unnecessary if check into templates/controllers/controller-test.go (#2838)
- fix small issues (#2835) (#2774)
- remove the namespaced option (#2805)
Add new Golang plugin (go/v4-alpha) - (adds supports for Apple Silicon) (#2785)
Kubebuilder will scaffold using the go/v4-alpha plugin only if specified when initializing the project (i.e.
kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project --plugins=go/v4-alpha
). This plugin adds support to Apple Silicon and the upper Kustomize 4x version. (More Info)
🐛 Bug Fixes
- (go/v3, go/v4-alpha): fix makefile targets do not re-install binaries when they are found in the project bin directory (#2844)
- (go/v3): remove a no longer applied comment from Makefile (#2808)
- (API) remove KustomizeVersion const from Golang plugin ( the version is defined in the kustomize plugins which is responsable for ) (#2787)
🎉 Thanks to all our contributors!
New Contributors
- @mjlshen made their first contribution in #2784
- @laxmikantbpandhare made their first contribution in #2794
- @arybolovlev made their first contribution in #2807
- @tomasfabian made their first contribution in #2778
- @rpriyanshu9 made their first contribution in #2821
- @FotiadisM made their first contribution in #2844
- @nandakumar12 made their first contribution in #2849
- @LittleWat made their first contribution in #2838
Full Changelog: v3.5.0...v3.6.0
v3.5.0
v3.5.0
changes since v3.4.1
⚠️ Breaking Changes
- upgrade controller-runtime from v0.11.2 to v0.12.1 and k8s deps from 1.23 to 1.24.1 (#2679). More info
Note: if you are migrating your project from a version which is using controller-runtime old than v0.7.0 please ensure that you look in the notes about the changes regards the leader election.
✨ New Features
- ensure that Pod/Container(s) scaffold by default via the tool are restricted (#2700, #2767, #2720). To know more about its motivations
- upgrade controller-gen from 0.8.0 to 0.9.0 (#2715). More info
- (external plugins) add new api to support external plugins(plugin phase 2): add support to pass CLI flags (#2693, #2338) More info
- (kustomize/v2-alpha) add new plugin to allow address the changes from kustomize v3 to v4 (#2750, #2755, #2552 )
- (config-gen alpha command) update deps controller-runtime and k8s to be aligned with the project (#2739)
- (for all scaffolds and plugins) upgrade gcr.io/kubebuilder/kube-rbac-proxy from v0.11.0 to v0.12.0 (#2738)
- (go/v3) add support to go 1.18 update envtest version to use k8s 1.24 (#2714)
- (go/v3) upgrade envtest from 1.23 to 1.24.1 (#2713)
- (kustomize/v1, go/v3) : Add new LeaderElectionReleaseOnCancel as true option commented to let users know when they can use it (#2596)
- (declarative/v1) : Update the sigs.k8s.io/kubebuilder-declarative-pattern dep used for projects scaffolded from fea7e5cc701290589ec20ef4d9c0629d08b5307d to d0f104b6a96e152043e9c2d76229373a981ac96a (#2682)
- kubebuilder-tools since for darwin/arm64 (
kubebuilder-tools-1.24.1-darwin-arm64.tar.gz
) are now provided (see here). (#2762)
🐛 Bug Fixes
- (go/v2) fix the issue introduced by removing the GO111MODULE=on from Dockerfile (#2678)
📢 Deprecations
Legacy layout "Kubebuilder 2.x"
provided via go/v2
plugin is deprecated
Since 28 Apr 2021, the default layout produced by Kubebuilder changed and is done via the go/v3
.
Who is affected?
Only affects who has been scaffolding the projects with --plugins=go/v2
or built the project with Kubebuider 2.x
and did not migrate their project for Kubebuilder 3.x
(go/v3
).
Why this deprecation is required?
The go/v2
plugin cannot scaffold projects which use CRDs and/or Webhooks v1 API version. The go/v2
plugin produces scaffolds with the v1beta1 API version for CRDs and Webhooks which was deprecated in Kubernetes 1.16
and removed in 1.22
.
Note that this plugin was kept to ensure backwards compatibility with projects that were scaffolded with the old "Kubebuilder 2.x"
layout and does not properly work with the new plugin ecosystem that was introduced with Kubebuilder 3.0.0
More info.
What is recommended?
We encourage you to migrate your project. For further information check the Migration guide.
💡 You can check samples using this plugin by looking at the
project-v2
directory under the testdata on the root directory of the Kubebuilder project and compare with theproject-v3
to check the changes.
Notes:
⚠️ The flags--crd-version
and--webhook-version
provided viago/v3
plugin (default scaffold) are deprecated since kubebuilder release v3.3.0. #2340.We do not encourage you to use these options since projects produced with CRD/Webhooks v1beta1 version cannot work on Kubernetes clusters >=
1.22
and by using the API v1 (default scaffold when the flags are not used) you can produce projects which can work on K8s clusters >=1.16
.
Thanks to all our contributors!
Release v3.4.1
v3.4.1
changes since v3.4.0
🐛 Bug Fixes
- (go/v3 plugin): Avoid adding duplicated code fragments (#2619)
- (Kubebuilder lib): Function InsertCode should return an error when the target string is not found in content (#2641)
Thanks to all our contributors!
IMPORTANT NOTE
- Kubebuilder up to this release does not support Darwin arm64 (Apple Silicon): For further information see: #1932 (comment)
- Kubebuilder does not support the go 1.18 version. You should still be using go versions 1.17+ < 1.18 with this release. For further information see: #2559 (comment)
Release v3.4.0
Changelog:
v3.4.0
changes since v3.3.0
✨ New Features
- (go/v3): Add README.md template to scaffolding templates (#2610)
- (config-gen) Updated the image gcr.io/kubebuilder/kube-rbac-proxy from v0.5.0 to v0.11.0 (#2595)
- (config-gen alpha command): upgrade sigs.k8s.io/controller-tools from v0.7.0 to v0.8.0 (#2586)
- (go/v3) : Upgrade controller-runtime from v0.11.0 to v0.11.2 (k8s api dependencies consequently upgraded from 1.23.0 to 1.23.5) (#2584)
- (kustomize/v1) : Upgrade kube-rbac-proxy from v0.8.0 to v0.11.0 (#2579)
- (Kubebuilder CLI): upgrade k8s deps from 1.23.0 to 1.23.5 (#2575)
- (go/v2 and go/v3): Remove deprecated go get from Makefile templates (#2486)
- (Kubebuilder CLI): Add support for build binaries for darwin/arm64 arch (#2516)
- (declarative/v1): Generate Dockerfile from declarative plugin (#2507)
🐛 Bug Fixes
- (go/v3) : fix: suite test using global cfg and update docs (#2602)
- (go/v3): assign config to global config (#2573)
- (go/v3): ensure that the plugin can only be used with its go supported version >= 1.17 and < 1.18 (#2553)
- (kustomize/v1): fix the issue to scaffold the same Kind for different groups with multi-group support by using group name in crd/patches and rbac editor/viewer manifests (#2500)
IMPORTANT NOTE
We are now releasing the Kubebuilder binary for Darwin arm64 (Apple Silicon). However, not all of the tools that Kubebuilder depends on support this architecture, most notably Kustomize v3. Because of this Kubebuilder still not supporting Darwin arm64 (Apple Silicon).
By default, the go/v3 plugin uses Kustomize v3, which does not support Darwin arm64. You might workaround by modifying the Makefile to use Kustomize v4, but we do not officially support Kustomize v4 with the default scaffold (go/v3) so there may be unexpected behaviour including breaking changes with existing projects that use Kustomize v3.
For further info see #1932 (comment).
Thanks to all our contributors!
v3.3.0
v3.3.0
changes since v3.2.0
⚠️ Breaking Changes
- upgrade controller-runtime from 0.10.0 to 0.11.0, k8s from 1.22 to 1.23 and controller-gen from v0.0.7 to v0.8.0" (#2471)
✨ New Features
- Update go version to 1.17 (#2446)
- (kustomize/v1) reduce the debug log level for the sidecar container kube-rbac-proxy from 10 to 0 (#2435)
- Add resource requests and limits to kube-rbac-proxy (#2429)
Thanks to all our contributors!
v3.2.0
v3.2.0
changes since v3.1.0
⚠️ Breaking Changes
- (go/v3) update deps to use k8s 1.22 (#2340)
- This is only a breaking change if using v1beta1 CRDs or webhook configs
✨ New Features
- Tag bollerplate Makefile targets as .PHONY (#2397)
- increase resources limits to be less restrictive and match the values with k8s doc examples (#2368)
- Add default-container annotation (#2376)
- Add todo(user) to make clear the need to optimize the values of the manager resources according to the needs (#2365)
- Add flag for ignore-not-found to make undeploy (#2341)
- ensure that the whole code has the same nomenclature TODO(user) (#2366)
- Include base.go.kubebuilder.io/v3 plugin in CLI (#2350)
- Spec for Phase 2 Plugins (#2281)
- fix(scaffolds): better defaults (#2255)
- Extend files whitelist for init cmd (#2160)
- bump k8s dependencies to 1.21 (#2208)
🐛 Bug Fixes
- fixes default value for the --ignore-not-found flag in the install and undeploy make targets (#2406)
- Remove install.sh (#2256)
- fix typo todo text for resource values (#2378)
- Improve scaffolding to filter existing multiline code fragments (#2343)
- Fix e2e tests that timeout when run locally (#2356)
- Defer GinkgoRecover() in test goroutines (#2345)
- fix: ignore non-go files during Docker build (#2081)
- Fix config-gen documentation bug (#2210)
- Update kubernetes-sigs/controller-tools to v0.5.0 (#2200)
- update config-gen to match v3 expectations (#2205)
- Refactor
alpha config-gen
to use embed from go 1.16 (#2204) - Fix CI for go 1.16 (#2203)
- fix: incorrect cert-manager kustomize comments (#2196)
- chore(golang): refactor go version check for per-plugin configuration (#2290)
Thanks to all our contributors!
v3.1.0
v3.0.0
v3.0.0
changes since v3.0.0-rc.0
✨ New Features
- (go/v3) Makefile: set SHELL to the system's
bash
binary with shell opts (#2149)
🐛 Bug Fixes
- (go/v3) moved leases.coordination.k8s.io to its own proxy-role rule (#2151)
- regression - extracommands require a valid PROJECT file again (#2126)
changes since v2.3.1
⚠️ Breaking Changes
- move declarative plugin to golang domain (#2114)
- Plugin phase 1.5 implementation (#2060)
- Export scaffolding machinery (#2082)
- Inject filesystem from CLI instead of creating several per command (#2080)
- Decouple plugin requirements from Config interface (#2047)
- Explicitly define WithCompletion as an Option (#2045)
- Resource validation (#1974)
- Add --plural flag (go/v3) (#1967)
- Update models (#1911)
- upgrade kubebuilder module from v2 to v3 (#1958)
- change structure to store crdVersion and webhookversion (go/v3-alpha) (#1899)
- (go/v3) stabilize and default the plugin (#1882)
- (go/v3-alpha) bump controller-runtime to v0.7.0 (#1886)
- pkg/cli overhaul (#1828)
- (go/v3-alpha) Align flag names with Kubernetes Components (#1852)
- (go/v3-alpha) Adding support for scaffolding with a versioned ComponentConfig (#1790)
- (go/v3-alpha) bump cert-manager CRs to v1 (#1840)
- Re-organize pkg/plugin directory (#1822)
- (go/v3-alpha) default to v1 CRDs and webhooks (#1644)
- (go/v3-alpha) Makefile: install kustomize and controller-gen locally (#1813)
- Provide version information as a CLI option (#1773)
- (go/v3-alpha) deps: bump controller-runtime to v0.7.0-alpha.6 (#1804)
- Go module fullfillment for v2+ (#1792)
- upgrade controller-tool dep from 0.3.0 to 0.4.0 (go/v3-alpha only) (#1787)
- [Rename] Disambiguate plugin by calling subcommand what the plugin getters returns instead of plugin (#1748)
- Generate controllers with API Group name as package names in multi-group projects (only Go plugin v3) (#1729)
- Update kubebuilder cli and plugin v3+ to use go version 1.15 (#1716)
✨ New Features
- (go/v3) Makefile: set SHELL to the system's
bash
binary with shell opts (#2149) - add the common plugin(s) to allow it to be used by consumers (#2106)
- Allow bundles to be used as input to other bundles (#2112)
- Allow to modify the root's command description (#2105)
- Enable the storage of multiple plugins as layout (#2096)
- Provide third-party devs the option to provide their own alpha subcommands (#2089)
- Add fish completion (#2088)
- Add
kubebuilder alpha config-gen
command to explore generating configuration with kustomize functions (#1831) - (go/v3) create and bind to a non-default service account (#2070)
- (go/v3) bump controller-runtime to v0.7.2 (#2064)
- : Add go mod tidy to be executed after the scaffolding api (#2037)
- Accept auto-generated files from GitHub into the allowed set of files (#2014)
- Return a typed error in case DecodePluginConfig was unable to find the provided key (#1985)
- Remove make calls from post-scaffold hooks (#1983)
- Add the rest of the missing fields and stabilize config v3 (#1968)
- Tolerate "dot" directories when checking if dir is empty (#1944)
- (go/v3) change 'runAsUser: 65532' to 'runAsNonRoot: true' (#1978)
- Use ErrorIfCRDPathMissing in EnvTest (#1765)
- *: upgrade kube-rbac-proxy to v0.8.0 (#1955)
- rename probes endpoints (go/v3) (#1910)
- Build the command and use it to report user errors (#1937)
- Make directory-not-empty error more self-explanatory (#1943)
- Add help dialog to makefile template (#1947)
- (go/v3) upgrade kubebuilder-declarative-pattern to k8s v1.19 (#1946)
- Remove misleading help that mentioned dep (#1945)
- Remove spaces from machine-readable comments (#1868)
- (go/v3) Add the --force option for the webhook (#1903)
- add new extension to markers in order to allow work with .yml (#1907)
- Change the webhook GVK in help text to match kb create api (#1881)
- (go/v3-alpha) Add the liveness and readiness probe in the manager deployment (#1856)
- upgrade controller-runtime from v0.6.3 to v0.6.4 (go/v2 only) (#1880)
- upgrade controller-rutime from v0.7.0-alpha.6 to v0.7.0-alpha.8 (go/v3-alpha) (#1875)
- add make run option for webhooks (go/v3-alpha) (#1846)
- go/v3-alpha: bump KustomizeVersion to v3.8.7 (#1838)
- (go/v3-alpha) *: Replace 'docker build . -t ${IMG}' with '-t ${IMG} .' (#1817)
- Add the liveness and readiness probe in the manager deployment (#1795)
- Suggestions for create and alpha commands (#1775)
- Upgrade the version of kubernetes to v1.18.0 for local e2e tests (#1744)
- Provide a cli option to enable and disable completion command (#1776)
- Cleanup in the controller and webhook suites scaffolding (go/v3-alpha) (#1760)
- remove v1 version and only shows --plugins flag when the project version is != V2 (#1763)
- Add copyright and license to scaffolded webhook suite test file (#1758)
- Add scaffolding for the webhook test suite (go/v3-alpha) (#1710)
- Make the edit command to be a plugin. (#1691)
- add comments for the exported methods in generated controllers (only v3+) (#1690)
- Add all kubernetes auth plugins for Azure, OIDC and gcp (only v3+) (#1742)
- not allow to init the project in a directory that is not cleaned (v3+ only) (#1738)
- feat(logging): make logging work by default (only v3+) (#1721)
- Move the webhookcainjection_patch.yaml file creation from init project to webhook creation (#1728)
- upgrade controller-runtime from v0.6.2 to v0.6.3 (#1715)
- replace deprecated function LoggerTo() from zap package (only v3+) (#1692)
- Added support for empty group in kubebuilder api creation with v3+ #1404 (#1679)
- Added the changes for include finalizer as a default controller markers (#1688)
- specify nonroot uid for manager (v3+ only) (#1635)
🐛 Bug Fixes
- (go/v3) moved leases.coordination.k8s.io to its own proxy-role rule (#2151)
- regression - extracommands require a valid PROJECT file again (#2126)
- do not generate the cert-manager directory by default. (#2111)
- default service monitor configuration to use https (#2065)
- Fix alpha extra commands parent command (#2092)
- Add https to the webpage (#2050)
- fix unit tests to work with later versions of ginkgo/gomega (#2039)
- Fix the bug where an error was being hidden by a potentially valid flag not being recognized by the root command (#2023)
- (config/v3) Track in the project configuration file resources without API (#2003)
- Fix go/v2 with config/v3 resources in config file to store webhook information (#1998)
- Fix sorting issue with plugin versions and their supported project versions (#1995)
- Validate the plugin flag (#1970)
- Use correct file name in the comments of
[kind]_types.go
(#1927) - Fix --force option to recreate the files by kubebuilder create api (#1847)
- Fix the path of probes (go/v3-alpha) (#1905)
- (go/v3-alpha) add leases.coordination.k8s.io to leader-election-role (#1809)
- kubebuilder edit ignore the errors if the project layout is already on same type (#1754)
- Fix the kubebuilder api creation when resource creation is set to false (#1770)
- fix copyright info when has not a owner set (#1749)
- Fix the webhook creation for defaulting webhooks (#1718)
- use rbac.authorization.k8s.io/v1 for the auth proxy client (#1731)
- Remove unneeded caBundle value from webhook patches (V3 only) (#1699)
- Add validation for the main.go file present in root directory (#1726)
- check if resource exist to allow to create webhooks (#1708)
- fix: the CRD paths is only ../.. when is multigroup (#1682)
- Fix CRD Path for Multigroup (#1673)
❓ Sort these by hand
- 👻 Enhance regex patterns (#1745)
- Update flect from v0.2.1 to v0.2.2 (#1698)
- :seeding: rename generate_mutiversion.sh to generate_multiversion.sh (#1683)
- Fix 1680: Usage of nonexistent namespace in cronjob example tests (#1681)
- doc: update testadata projects used in the tutorial (#1632)
- doc: correct minor grammar mistakes (#1670)
- doc: update reference with name of page (#1662)
- dev(dx): lint improvements (use github actions to call it) (#1649)
- docs: added a full stop for better readbility (#1661)
- fix title: lost "needs" (#1658)
- feat: envtest setup via target with docs (v3 only) (#1626)
- doc: makefile helpers nit fix (#1648)
- Fix path to generated main.go (#1643)
- docs/book: fix small typos (#1638)
- cleanup: organize templates in the same structure that they are scaffolded (#1623)
- doc: add makefile helpers (#1631)
- cleanup-book: remove docs/book/src/migration/testdata (#1499)
- Fix old link to envtest docs that should have been removed (#1624)
- pkg/model/config: only project versions >= v3 can use plugins config options (#1628)
- using built in finalizer function and fix some syntax (#1629)
- pkg/plugin/{v2,v3}: controller-runtime v0.6.2 (#1625)
- pkg/plugin/v2: use config project name if project version is v3+ (#1611)
- fix: script call for linux (#1610)
- plugins: change project name config tag, add
pkg/model/file.ProjectNameMixin
(#1609) - feat: add script in the repo to setup envtest (#1608)
- config: add
project-name
config key and optionalinit --project-name
(#1603) - Fix typos (#1601)
- pkg/plugin/v3: use repo instead of directory basename as project name (#1596)
- cleanup: Remove the word sanity from our codebase (#1594)
- Add missing kubebuilder annotation to the getting started document (#1587)
- doc: replace links to godoc.org with links to pkg.go.dev (#1588)
- fix crd-version-pref url (#1580)
- feat: add dockerignore file to the scaffold (V3 only) (#1506)
- Add envtest testing docs to extend cronjob example (#1521)
- Check if has Scaffold before exec (#1577)
- feat: add undeploy IMG option (V3 only) (#1571)
- feat: improve go test for the scaffolded projects due checking race...
v3.0.0-rc.0
v3.0.0-rc.0
changes since v3.0.0-beta.1
⚠️ Breaking Changes
- move declarative plugin to golang domain (#2114)
✨ New Features
- add the common plugin(s) to allow it to be used by consumers (#2106)
- Allow bundles to be used as input to other bundles (#2112)
- Allow to modify the root's command description (#2105)
🐛 Bug Fixes
- do not generate the cert-manager directory by default. (#2111)
Thanks to all our contributors!
v3.0.0-beta.1
v3.0.0-beta.1
changes since v3.0.0-beta.0
⚠️ Breaking Changes
- Plugin phase 1.5 implementation (#2060)
- Export scaffolding machinery (#2082)
- Inject filesystem from CLI instead of creating several per command (#2080)
- Decouple plugin requirements from Config interface (#2047)
- Explicitly define WithCompletion as an Option (#2045)
✨ New Features
- Enable the storage of multiple plugins as layout (#2096)
- Provide third-party devs the option to provide their own alpha subcommands (#2089)
- Add fish completion (#2088)
- Add
kubebuilder alpha config-gen
command to explore generating configuration with kustomize functions (#1831) - (go/v3) create and bind to a non-default service account (#2070)
- (go/v3) bump controller-runtime to v0.7.2 (#2064)
- : Add go mod tidy to be executed after the scaffolding api (#2037)
🐛 Bug Fixes
- default service monitor configuration to use https (#2065)
- Fix alpha extra commands parent command (#2092)
- Add https to the webpage (#2050)
- fix unit tests to work with later versions of ginkgo/gomega (#2039)
Thanks to all our contributors!