Repository: kubernetes-sigs/kubebuilder (language: go)

Issue:
Update Docs around creating a Webhook for Core types
### What do you want to happen?

[The Example for creating an Admission Webhook for Core Types](https://book.kubebuilder.io/reference/webhook-for-core-types) seems to be outdated. The usage of controller-runtime 0.15.0 in the go/v4 plugin have removed the `InjectDecoder` method, so the decoder has to be explicitly loaded when the webhook is added to the Manager.

I would like to update the documents to reflect this change.

### Extra Labels

/kind documentation


Discussion / hints:
I'm happy to do a PR for this if I can get a 👍 from a project maintainer
HI @phenixblue,

Your PR's to contribute with the project are more than welcome. 
Please, feel free to propose changes in the default scaffold and/or docs to address this one. 
 

Fix patch:
diff --git a/docs/book/src/reference/webhook-for-core-types.md b/docs/book/src/reference/webhook-for-core-types.md
index 692ef22fc35..5e487c2d5ae 100644
--- a/docs/book/src/reference/webhook-for-core-types.md
+++ b/docs/book/src/reference/webhook-for-core-types.md
@@ -38,18 +38,6 @@ func (a *podAnnotator) Handle(ctx context.Context, req admission.Request) admiss
 }
 ```
 
-If you need a client, just pass in the client at struct construction time.
-
-If you add the `InjectDecoder` method for your handler, a decoder will be
-injected for you.
-
-```go
-func (a *podAnnotator) InjectDecoder(d *admission.Decoder) error {
-	a.decoder = d
-	return nil
-}
-```
-
 **Note**: in order to have controller-gen generate the webhook configuration for
 you, you need to add markers. For example,
 `// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=fail,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io`
@@ -64,6 +52,19 @@ mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{Handler: &p
 
 You need to ensure the path here match the path in the marker.
 
+### Client/Decoder
+
+If you need a client and/or decoder, just pass them in at struct construction time.
+
+```go
+mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{
+	Handler: &podAnnotator{
+		Client:   mgr.GetClient(),
+		Decoder:  admission.NewDecoder(mgr.GetScheme()),
+	},
+})
+```
+
 ## Deploy
 
 Deploying it is just like deploying a webhook server for CRD. You need to


Test patch: