mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-08 10:04:25 +00:00
fix none namespace error
This commit is contained in:
parent
f506789498
commit
a963843245
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ func createNamespacedPV(namespace string, dclient *dclient.Client, pvLister kyve
|
|||
if reflect.DeepEqual(curPv, kyverno.NamespacedPolicyViolation{}) {
|
||||
glog.V(4).Infof("creating new namespaced policy violation for policy %s & resource %s", newPv.Spec.Policy, newPv.Spec.ResourceSpec.ToKey())
|
||||
|
||||
if err := retryGetResource(newPv.Namespace, dclient, newPv.Spec.ResourceSpec); err != nil {
|
||||
if err := retryGetResource(namespace, dclient, newPv.Spec.ResourceSpec); err != nil {
|
||||
return fmt.Errorf("failed to get resource for policy violation on resource '%s': %v", newPv.Spec.ResourceSpec.ToKey(), err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue