Skip to content

Commit

Permalink
fixed admission.Decoder in handler
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-akulshin committed Nov 11, 2024
1 parent eff4d70 commit 54268ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func RunWebhookServer(c *rest.Config) error {
return errors.Wrap(err, "Failed to create new webhook manager")
}
bpValidator := &validatingwebhook.BlueprintValidator{}
if err = bpValidator.InjectDecoder(admission.NewDecoder(mgr.GetScheme())); err != nil {
decoder := admission.NewDecoder(mgr.GetScheme())
if err = bpValidator.InjectDecoder(&decoder); err != nil {
return errors.Wrap(err, "Failed to inject decoder")
}

Expand Down

0 comments on commit 54268ae

Please sign in to comment.