kyverno / policy-reporter

Monitoring and Observability Tool for the PolicyReport CRD with an optional UI.
https://kyverno.github.io/policy-reporter/
MIT License
270 stars 79 forks source link

Include the timestamp #437

Closed mveitas closed 4 days ago

mveitas commented 4 months ago

When viewing the details of a policy result, it would be nice to know the timestamp associated with the result. We have had a number of people comment that they have added an exception to the policy and want to know if the data is stale

- category: Required
  message: 'validation error: The label `xxxx` is required. rule check-for-label-xxxx-owner
    failed at path /metadata/labels/xxxx/owner/'
  policy: require-xxx-labels
  result: fail
  rule: check-for-label-xxx-owner
  scored: true
  source: kyverno
  timestamp:
    nanos: 0
    seconds: 1715777711
fjogeleit commented 4 months ago

Where do you want to see the timesamp? In the UI / metrics?

fjogeleit commented 4 months ago

In general should the result switch from fail to skip after a policy exception is applied.

mveitas commented 4 months ago

Within the UI would be nice as part of the details if you drill into a particular result. I'd have to look at the newer UI design to make a suggestion of where this might be shown.

fjogeleit commented 4 months ago

okay, will take a look on it.

fjogeleit commented 2 months ago

Sorry for the delayed response, would something like work for you? The date formatting is based on the used browser language. de-DE in my case.

Bildschirmfoto 2024-07-28 um 13 23 52
mveitas commented 2 months ago

That looks great!

fjogeleit commented 2 months ago

okay, thanks. will be released with the next preview build. Which will also be the first beta build

fjogeleit commented 4 days ago

Forgot to mention, its now available in the beta versions of the current preview release.