1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix arguments passed to DeepEqual (#5801)

Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>

Signed-off-by: Vyom-Yadav <jackhammervyom@gmail.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Vyom Yadav 2022-12-29 17:48:03 +05:30 committed by GitHub
parent 537e9fd8ed
commit 7efd40adcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ func (v *validationHandler) HandleValidation(
logger := v.log.WithValues("action", "validate", "resource", resourceName, "operation", request.Operation, "gvk", request.Kind)
var deletionTimeStamp *metav1.Time
if reflect.DeepEqual(policyContext.NewResource, unstructured.Unstructured{}) {
if reflect.DeepEqual(policyContext.NewResource(), unstructured.Unstructured{}) {
resource := policyContext.NewResource()
deletionTimeStamp = resource.GetDeletionTimestamp()
} else {