fixing clone source replication
@@ -162,6 +162,8 @@ func (ws *WebhookServer) handleUpdateCloneSourceResource(resLabels map[string]st
logger.V(4).Info("skipping updation of generate request as policy is deleted")
} else {
logger.Error(err, "failed to get generate policy", "Name", policyName)
+ }
+ } else {
selector := labels.SelectorFromSet(labels.Set(map[string]string{
"generate.kyverno.io/policy-name": policyName,
}))
@@ -171,11 +173,11 @@ func (ws *WebhookServer) handleUpdateCloneSourceResource(resLabels map[string]st
logger.Error(err, "failed to get generate request for the resource", "label", "generate.kyverno.io/policy-name")
return
}
+
for _, gr := range grList {
ws.updateAnnotationInGR(gr, logger)
}
}
- }
}
}
