Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Co-authored-by: Mykola Marzhan <[email protected]>
  • Loading branch information
egegunes and delgod committed Oct 18, 2021
1 parent 4368519 commit c76e2f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ func (h *hook) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer r.Body.Close()
req := &admission.AdmissionReview{}

bites, err := ioutil.ReadAll(r.Body)
bytes, err := ioutil.ReadAll(r.Body)
if err != nil {
h.log.Error(err, "can't read request body")
return
}

if err := json.Decode(bites, req, true); err != nil {
if err := json.Decode(bytes, req, true); err != nil {
h.log.Error(err, "Can't decode admission review request")
return
}
Expand Down

0 comments on commit c76e2f1

Please sign in to comment.