mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
fix: incorrect namespace in report controller (#4637)
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> Co-authored-by: Prateek Pandey <prateek.pandey@nirmata.com>
This commit is contained in:
parent
316640c72b
commit
b9baae9746
1 changed files with 1 additions and 1 deletions
|
@ -876,7 +876,7 @@ func (g *ReportGenerator) updateReportsForDeletedResource(resName string, new *u
|
|||
|
||||
polr.SetGroupVersionKind(schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: "PolicyReport"})
|
||||
|
||||
if _, err := g.pclient.Wgpolicyk8sV1alpha2().PolicyReports(new.GetNamespace()).Update(context.TODO(), polr, metav1.UpdateOptions{}); err != nil {
|
||||
if _, err := g.pclient.Wgpolicyk8sV1alpha2().PolicyReports(polr.Namespace).Update(context.TODO(), polr, metav1.UpdateOptions{}); err != nil {
|
||||
return fmt.Errorf("failed to update clusterPolicyReport %s %v", polr.Name, err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue