Skip to content

Commit

Permalink
update ....
Browse files Browse the repository at this point in the history
  • Loading branch information
takara9 committed Jun 4, 2024
1 parent 5852d66 commit ca54585
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hooks/mutate_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func (m *podMutator) Handle(ctx context.Context, req admission.Request) admissio
m.log.Info("mutating pod,", "name", namespacedName, "profile", m.profileName)

po := &corev1.Pod{}
err := admission.NewDecoder(runtime.NewScheme()).Decode(req, po)
d := admission.NewDecoder(runtime.NewScheme())
err:= d.Decode(req, po)
if err != nil {
m.log.Error(err, "failed to decode pod", "name", namespacedName, "profile", m.profileName)
return admission.Errored(http.StatusBadRequest, err)
Expand Down

0 comments on commit ca54585

Please sign in to comment.