-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed Changes for 4.3.0 Release #4214
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
Comments
camilamacedo86
added
the
kind/feature
Categorizes issue or PR as related to a new feature.
label
Oct 10, 2024
This release is going to be big and exciting, with a bunch of breaking changes! Thanks all for all the effort in getting it through. Lgtm for the draft from my end 👍 |
Looks good to me 👍🏼 |
Everything looks good! @camilamacedo86 |
Thanks for the update. The changes look great, specially:
This is going to help heaps! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What do you want to happen?
Please take a look at the draft for the upcoming 4.3.0 release and what’s been merged into the master branch so far bellow.
We’ve been working to improve the documentation for this upcoming release. We’ve reviewed and rewritten sections, cleaning up outdated information and making significant revisions to areas such as "Watching Resources," "Getting Started," and "Plugins." You can check the current state of the docs and how they will appear in production after the release by visiting the “nightly” docs at:master.book.kubebuilder.io.
Please let us know if you have any suggestions, objections, or other feedback for the next release. If no objections are raised, we are planning to push the release any time after Monday, the 14th.
------ Draft ----
(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. (⚠️ : (go/v4): Replace usage of deprecated webhook.Validator and webhook.Defaulter interfaces #4060)api/<version>
orapi/<group>/<version>
tointernal/webhook/<version>
orinternal/webhook/<group>/<version>
. This restructuring improves project organization. (⚠️ (go/v4) decouple webhooks from APIs (Move Webhooks fromapi/<version>
orapi/<group>/<version>
tointernal/webhook/<version>
orinternal/webhook/<group>/<version>
) #4150)APIPackagePathLegacy
method, which has been obsolete since release 4.0.0. This change cleans up unused code. (🐛 cleanup: remove func APIPackagePathLegacy which is no longer used since release 4.0.0 #4182)HasFragment
method, favoringHasFileContentWith
to reduce duplication and simplify the codebase. (⚠️ 🐛fix: remove duplicate HasFragment method, replaced by HasFileContentWith #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. (🐛 (go/v4): fix test e2e by ensuring that make manifests and generate are executed as part of the tests #4122)make test-e2e
withmake test
for consistent behavior. (🐛 fix: ensure that make test-e2e call the same targets of make test #4125)+kubebuilder:scaffold:e2e-webhooks-checks
marker. (✨ (go/v4) Add scaffold for e2e webhook checks #4121)e2e/test.go
. (✨ (go/v4): cleanup: in e2e/test.go, make Gomega assertions more concise #4141, 🐛 (go/v4): Refactor e2e-tests for clearer error handling and readable logs #4158, 🐛 (go/v4): Follow -up: Refactor e2e-tests for clearer error handling and readable logs #4166, ✨ (go/v4): e2e tests: add data collection on failures and code simplification #4175)v1.14.4
tov1.16.0
for better compatibility and features. (✨ Upgrade cert-manager version used on the tests from v1.14.4 to v1.16.0 #4209)🐛 Bug Fixes
typeNamespaceName
withtypeNamespacedName
to ensure accurate variable naming. (🐛 (deploy-image/v1-alpha1): Fix typo issue by replacing typeNamespaceName with typeNamespacedName #4100)nolint
where necessary to prevent failures for specific cases that should not fail during checks. ( 🐛 (go/v4): Fix linter issues in the scaffold #4111)godot
,gofumpt
, andnlreturn
, ensuring better code formatting and style. (🐛 (go/v4): fix linter issues to allow pass in the stricter linter checks such as; godot, gofumpt, nlreturn #4133)HasResource
package method to stop once a match is found, improving performance and accuracy in resource handling. (🐛 Fix HasResource pkg method to properly stop when a match is found #4190)webhookcainjection_patch
and clarified the use of cert-manager as a replacement. (🐛 (go/v4,kustomize/v2): Fix problems by simplify scaffold and removing webhookcainjection_patch. Clarifying replacements for cert-manager #4123)What's Changed
api/<version>
orapi/<group>/<version>
tointernal/webhook/<version>
orinternal/webhook/<group>/<version>
) by @camilamacedo86 in ⚠️ (go/v4) decouple webhooks from APIs (Move Webhooks fromapi/<version>
orapi/<group>/<version>
tointernal/webhook/<version>
orinternal/webhook/<group>/<version>
) #4150New Contributors
Full Changelog: v4.2.0...v4.3.0
The text was updated successfully, but these errors were encountered: