Skip to content

Commit

Permalink
🐛 do not error out on failing to discover a k8s container (#3361)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Feb 19, 2024
1 parent 7d1f8a5 commit 46e5509
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions providers/k8s/resources/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 46e5509

Please sign in to comment.