From a3c4b4da62bb0037dc46a744eefc31ad1b0ce950 Mon Sep 17 00:00:00 2001 From: Soule BA Date: Tue, 18 Jun 2024 23:49:50 +0200 Subject: [PATCH] Re-enable logging json patch on StatusDrifted Signed-off-by: Soule BA --- internal/reconcile/atomic_release.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/reconcile/atomic_release.go b/internal/reconcile/atomic_release.go index 7ae18c986..a57ab8334 100644 --- a/internal/reconcile/atomic_release.go +++ b/internal/reconcile/atomic_release.go @@ -388,8 +388,13 @@ func (r *AtomicRelease) actionForState(ctx context.Context, req *Request, state log.V(logger.DebugLevel).Info("resource deleted", "resource", diff.ResourceName(change.DesiredObject)) case jsondiff.DiffTypeUpdate: + patch := change.Patch + if change.DesiredObject.GetObjectKind().GroupVersionKind().Kind == "Secret" { + patch = jsondiff.MaskSecretPatchData(change.Patch) + } log.V(logger.DebugLevel).Info("resource modified", - "resource", diff.ResourceName(change.DesiredObject)) + "resource", diff.ResourceName(change.DesiredObject), + "patch", patch) } }