From 60c303e37c3c626530c5f8e5982c78183dbbbd97 Mon Sep 17 00:00:00 2001 From: Kim Schaefer Date: Sun, 27 Oct 2024 18:51:56 -0600 Subject: [PATCH] updated logging --- src/lib/finalizer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/finalizer.ts b/src/lib/finalizer.ts index dbd23e7c6..4d87e40fd 100644 --- a/src/lib/finalizer.ts +++ b/src/lib/finalizer.ts @@ -26,6 +26,9 @@ export function addFinalizer(request: PeprMutateRequ } request.Merge({ metadata: { finalizers } } as DeepPartial); + + // Log the addition of a finalizer with the alias + Log.info({ alias: request.Request.name }, `Added finalizer '${peprFinal}' to ${request.Raw.metadata?.name}`); } export async function removeFinalizer(binding: Binding, obj: KubernetesObject) { @@ -33,7 +36,7 @@ export async function removeFinalizer(binding: Binding, obj: KubernetesObject) { const meta = obj.metadata!; const resource = `${meta.namespace || "ClusterScoped"}/${meta.name}`; - Log.debug({ obj }, `Removing finalizer '${peprFinal}' from '${resource}'`); + Log.debug({ obj, alias: binding.alias }, `Removing finalizer '${peprFinal}' from '${resource}'`); // ensure request model is registerd with KFC (for non-built in CRD's, etc.) const { model, kind } = binding;