From 7efd40adcd0afe2300f67e0ce05ba63c9a044238 Mon Sep 17 00:00:00 2001 From: Vyom Yadav <73882557+Vyom-Yadav@users.noreply.github.com> Date: Thu, 29 Dec 2022 17:48:03 +0530 Subject: [PATCH] fix arguments passed to DeepEqual (#5801) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vyom-Yadav Signed-off-by: Vyom-Yadav Co-authored-by: Charles-Edouard Brétéché --- pkg/webhooks/resource/validation/validation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webhooks/resource/validation/validation.go b/pkg/webhooks/resource/validation/validation.go index dc9b2b076a..7a9275f9f5 100644 --- a/pkg/webhooks/resource/validation/validation.go +++ b/pkg/webhooks/resource/validation/validation.go @@ -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 {