Fix: Optimize the webhook log format (#5652)

Co-authored-by: caoxingming <caoxingming@jd.com>
This commit is contained in:
xingming01
2023-03-21 11:38:57 +08:00
committed by GitHub
co-authored by caoxingming
parent 2f6ea93272
commit 4d714ed2c2
@@ -60,7 +60,7 @@ func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) adm
}
// mutate the object
if err := h.Mutate(obj); err != nil {
klog.Error(err, "failed to mutate the componentDefinition", "name", obj.Name)
klog.ErrorS(err, "failed to mutate the componentDefinition", "name", obj.Name)
return admission.Errored(http.StatusBadRequest, err)
}