From 6c2c1a408d0e20501e955c210c0c96c13f20c47d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thor=20Anker=20Kvisg=C3=A5rd=20Lange?= Date: Wed, 31 Jul 2024 10:30:45 +0200 Subject: [PATCH] fix: Cannot identify image without sha --- pkg/controllers/workload.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pkg/controllers/workload.go b/pkg/controllers/workload.go index 165df5d..6f922a1 100644 --- a/pkg/controllers/workload.go +++ b/pkg/controllers/workload.go @@ -155,18 +155,6 @@ func (r *WorkloadController) reconcileWorkload(workloadKind kube.Kind) reconcile if !img.Central { uptodate = uptodate && img.LastScan.After(time.Now().Add(-12*time.Hour)) } - - if uptodate { - // Make sure reference to workload is recorded even if centrally scanned - parent, err := resolveOwnerChain(ctx, &r.ObjectResolver, workloadObj) - if err != nil { - return ctrl.Result{}, err - } - err = r.DepService.PushScan(ctx, ref, &dependencies.ScanResult{Workload: dependencies.RefFromKind(parent)}) - if err != nil { - return ctrl.Result{}, err - } - } } }