wg-policy-prototypes icon indicating copy to clipboard operation
wg-policy-prototypes copied to clipboard

Replace, append or create new PolicyReport

Open hardbyte opened this issue 11 months ago • 1 comments

Netchecks is an operator which carries out periodic assertions and produces PolicyReports. Up until now I've been appending new results to a PolicyReport after each of these periodic tests.

However this is leading to some confusion in the Kyverno Policy Reporter UI. With assertions both passing and failing (at different points in time). Could you shed any light into the assumptions or designs of PolicyReport CRD (and Kyverno Policy Reporter) with regard to handling historical results?

To be specific, say I have a network assertion CheckDNSFiltering which runs every 5 minutes. Would it be more in keeping with the design to create a new PolicyReport after each test (leaving the old PolicyReport), or updating the previous PolicyReport with the new results. I've come to the conclusion that appending to a single PolicyReport with the new results but still keeping the old is not in keeping with the design.

Thanks!

hardbyte avatar Mar 22 '24 19:03 hardbyte