From 95d0a18fae942697f3655157b9d30e425921cadd Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Mon, 19 Feb 2024 16:10:06 +0100 Subject: [PATCH] do not error out on failing to discover a k8s container Signed-off-by: Ivan Milchev --- providers/k8s/resources/discovery.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/providers/k8s/resources/discovery.go b/providers/k8s/resources/discovery.go index b8b0648944..e2741dc3d3 100644 --- a/providers/k8s/resources/discovery.go +++ b/providers/k8s/resources/discovery.go @@ -822,12 +822,14 @@ func convertImagesToAssets(images map[string]ContainerImage) ([]*inventory.Asset ref, err := name.ParseReference(i.resolvedImage, name.WeakValidation) if err != nil { - return nil, err + log.Error().Err(err).Msg("failed to parse image reference") + continue } a, err := ccresolver.GetImage(ref, nil) if err != nil { - return nil, err + log.Error().Err(err).Msg("failed to get image") + continue } assetList = append(assetList, a) }