Skip to content

Commit

Permalink
refactor: core components naming (#237)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan authored Oct 19, 2023
1 parent a0da45c commit dcdfdc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/trivyk8s/trivyk8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,17 @@ func (c *client) ListBomInfo(ctx context.Context) ([]*artifacts.Artifact, error)
if err != nil {
return []*artifacts.Artifact{}, err
}
artifactList = append(artifactList, &artifacts.Artifact{Kind: "PodBomInfo", Namespace: c.Namespace, Name: c.Name, RawResource: rawResource})
artifactList = append(artifactList, &artifacts.Artifact{Kind: "ControlPlaneComponents", Namespace: c.Namespace, Name: c.Name, RawResource: rawResource})
}
for _, ni := range b.NodesInfo {
rawResource, err := rawResource(&ni)
if err != nil {
return []*artifacts.Artifact{}, err
}
artifactList = append(artifactList, &artifacts.Artifact{Kind: "NodeBomInfo", Name: ni.NodeName, RawResource: rawResource})
artifactList = append(artifactList, &artifacts.Artifact{Kind: "NodeComponents", Name: ni.NodeName, RawResource: rawResource})
}
cr, err := rawResource(&bom.Result{ID: b.ID, Type: "ClusterInfo", Version: b.Version, Properties: b.Properties})
artifactList = append(artifactList, &artifacts.Artifact{Kind: "ClusterBomInfo", Name: b.ID, RawResource: cr})
artifactList = append(artifactList, &artifacts.Artifact{Kind: "Cluster", Name: b.ID, RawResource: cr})
return artifactList, err

}
Expand Down

0 comments on commit dcdfdc5

Please sign in to comment.