Skip to content

Commit

Permalink
Add missing return statement in the webhook admissions func
Browse files Browse the repository at this point in the history
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 <lleshchi@redhat.com>
  • Loading branch information
lleshchi committed Aug 3, 2023
1 parent 7f0c6dc commit 6eea962
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/webhook/admission/decode.go
Expand Up @@ -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()
Expand Down

0 comments on commit 6eea962

Please sign in to comment.