1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00

Merge pull request #3 from fjogeleit/development

Fix missing caching update
This commit is contained in:
Frank Jogeleit 2021-02-20 14:27:10 +01:00 committed by GitHub
commit 7e70ec672d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -90,6 +90,8 @@ func (m ClusterPolicyReportMetrics) GenerateMetrics() {
).
Set(1)
}
m.cachedReport(report)
case watch.Deleted:
policyGauge.WithLabelValues(report.Name, "Pass").Set(0)
policyGauge.WithLabelValues(report.Name, "Fail").Set(0)

View file

@ -102,6 +102,8 @@ func (m PolicyReportMetrics) GenerateMetrics() {
).
Set(1)
}
m.cachedReport(report)
case watch.Deleted:
policyGauge.WithLabelValues(report.Namespace, report.Name, "Pass").Set(0)
policyGauge.WithLabelValues(report.Namespace, report.Name, "Fail").Set(0)