Skip to content

Commit

Permalink
refactor(vulnz): use all clusters in config
Browse files Browse the repository at this point in the history
* set status to notnais if vuln errors

Co-authored-by: ybelmekk <[email protected]>
Co-authored-by: sindrerh2 <[email protected]>
  • Loading branch information
3 people committed Oct 18, 2024
1 parent caf2f38 commit eaf68bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func run(ctx context.Context, cfg *Config, log logrus.FieldLogger) error {
resolver := graph.NewResolver(
hookdClient,
k8sClient,
vulnerabilities.NewManager(cfg.ToVulnerabilitiesConfig(cfg.K8s.PkgConfig().Clusters)),
vulnerabilities.NewManager(cfg.ToVulnerabilitiesConfig(cfg.K8s.AllClusterNames())),
resourceUsageClient,
db,
cfg.Tenant,
Expand Down
2 changes: 2 additions & 0 deletions internal/graph/teams.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,7 @@ func (r *teamResolver) Status(ctx context.Context, obj *model.Team) (*model.Team
if err != nil {
return nil, fmt.Errorf("getting vulnerability status for all images: %w", err)
}
notNais += len(vulnErrs)

return model.AppsStatus{
Failing: failingApps,
Expand Down Expand Up @@ -832,6 +833,7 @@ func (r *teamResolver) Status(ctx context.Context, obj *model.Team) (*model.Team
if err != nil {
return nil, fmt.Errorf("getting vulnerability status for all images: %w", err)
}
notNais += len(vulnErrs)

return model.JobsStatus{
Failing: failingJobs,
Expand Down

0 comments on commit eaf68bc

Please sign in to comment.