From 6eea962e161a5258d826a1f912c461dc9bf537d6 Mon Sep 17 00:00:00 2001 From: Leah Leshchinsky Date: Thu, 3 Aug 2023 12:04:00 -0400 Subject: [PATCH] Add missing return statement in the webhook admissions func As the function is currently written without a return, for an unstructured object which is successfully unmashalled, it will fall through to the subsequent lines and fail to decode properly. Add return statement to successful unstructured decode. Signed-off-by: Leah Leshchinsky --- pkg/webhook/admission/decode.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/webhook/admission/decode.go b/pkg/webhook/admission/decode.go index f14f130f7b..7e9c0a96bc 100644 --- a/pkg/webhook/admission/decode.go +++ b/pkg/webhook/admission/decode.go @@ -71,6 +71,7 @@ func (d *Decoder) DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) er return err } unstructuredInto.SetUnstructuredContent(object) + return nil } deserializer := d.codecs.UniversalDeserializer()