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

fix: use generate name for admission reports (#10491)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2024-06-17 19:54:04 +02:00 committed by GitHub
parent 27a777db36
commit d75d19ab3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,7 +20,7 @@ func NewAdmissionReport(namespace, name string, gvr schema.GroupVersionResource,
} else {
report = &reportsv1.EphemeralReport{Spec: reportsv1.EphemeralReportSpec{}}
}
report.SetName(name)
report.SetGenerateName(name + "-")
report.SetNamespace(namespace)
SetResourceUid(report, resource.GetUID())
SetResourceGVR(report, gvr)