1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

log out deleted resources at default level (#5977)

Signed-off-by: ShutingZhao <shuting@nirmata.com>

Signed-off-by: ShutingZhao <shuting@nirmata.com>
This commit is contained in:
shuting 2023-01-12 01:23:06 +08:00 committed by GitHub
parent c2190bf2bb
commit baee6e9637
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ func (h *handlers) executePolicy(ctx context.Context, logger logr.Logger, policy
continue
}
}
debug.Info("resource matched, it will be deleted...")
logger.WithValues("name", name, "namespace", namespace).Info("resource matched, it will be deleted...")
if err := h.client.DeleteResource(ctx, resource.GetAPIVersion(), resource.GetKind(), namespace, name, false); err != nil {
debug.Error(err, "failed to delete resource")
errs = append(errs, err)