1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 18:38:40 +00:00

Add missing error check (#11587)

Signed-off-by: Tomas Aschan <tomasl@spotify.com>
This commit is contained in:
Tomas Aschan 2024-11-14 14:37:53 +01:00 committed by GitHub
parent cef7be1fdc
commit 07f5e9be08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,6 +26,8 @@ func manageData(log logr.Logger, target kyvernov1.ResourceSpec, data interface{}
if err != nil && apierrors.IsNotFound(err) {
// the target resource should always exist regardless of synchronize settings
return newCreateGenerateResponse(resource, target, nil)
} else if err != nil {
return newSkipGenerateResponse(nil, target, err)
}
log.V(4).Info("found target resource")