Skip to content

Commit 6eea962

Browse files
committed
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 <[email protected]>
1 parent 7f0c6dc commit 6eea962

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/webhook/admission/decode.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func (d *Decoder) DecodeRaw(rawObj runtime.RawExtension, into runtime.Object) er
7171
return err
7272
}
7373
unstructuredInto.SetUnstructuredContent(object)
74+
return nil
7475
}
7576

7677
deserializer := d.codecs.UniversalDeserializer()

0 commit comments

Comments
 (0)