webhook: remove useless code. (#8236)

* webhook: remove useless code

Signed-off-by: SpecialYang <940129520@qq.com>

* Remove duplicated codec
This commit is contained in:
Yang 2022-02-14 02:25:47 +08:00 committed by GitHub
parent c1be3499eb
commit 53a232f829
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 6 deletions

View file

@ -72,7 +72,6 @@ func (ia *IngressAdmission) HandleAdmission(obj runtime.Object) (runtime.Object,
codec := json.NewSerializerWithOptions(json.DefaultMetaFactory, scheme, scheme, json.SerializerOptions{
Pretty: true,
})
codec.Decode(review.Request.Object.Raw, nil, nil)
_, _, err := codec.Decode(review.Request.Object.Raw, nil, &ingress)
if err != nil {
klog.ErrorS(err, "failed to decode ingress")