Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add vulnerabilityreports controller #312

Merged
merged 4 commits into from
Nov 7, 2024
Merged

Conversation

zreigz
Copy link
Member

@zreigz zreigz commented Nov 6, 2024

No description provided.

@zreigz zreigz added the enhancement New feature or request label Nov 6, 2024
}

return &console.VulnerabilityReportAttributes{
ArtifactURL: nil,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaeljguarino I'm not sure how to get this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you would get this by concatenating registry + repository + tag/digest, in the usual docker image url format. Basically want it to be easily accessible for the ui, and also to potentially cross-ref elsewhere

@zreigz zreigz changed the title wip: add vulnerabilityreports controller feat: add vulnerabilityreports controller Nov 7, 2024
@zreigz
Copy link
Member Author

zreigz commented Nov 7, 2024

@michaeljguarino everything seems to work fine PTAL

@@ -152,6 +167,23 @@ func (r *VulnerabilityReportReconciler) getObjectFromOwnerReference(ctx context.
}

func (r *VulnerabilityReportReconciler) SetupWithManager(mgr ctrl.Manager) error {
logger := log.FromContext(r.Ctx)
r.reports = cmap.New[console.VulnerabilityReportAttributes]()
err := helpers.BackgroundPollUntilContextCancel(r.Ctx, 1*time.Minute, false, true, func(_ context.Context) (done bool, err error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this poll interval 10 minutes i think

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@zreigz zreigz merged commit 06f048c into main Nov 7, 2024
34 of 35 checks passed
@zreigz zreigz deleted the vulnerabilityreports branch November 7, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants