From 5598b36661e3bc9648d6f3fc3e3e698a4dab8cc3 Mon Sep 17 00:00:00 2001 From: ymqytw Date: Fri, 3 Feb 2017 11:49:37 -0800 Subject: [PATCH] extract util used by jsonmergepatch and SMPatch --- pkg/endpoints/handlers/rest.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/endpoints/handlers/rest.go b/pkg/endpoints/handlers/rest.go index a1f36ed7f..c1fdeeb60 100644 --- a/pkg/endpoints/handlers/rest.go +++ b/pkg/endpoints/handlers/rest.go @@ -39,6 +39,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/mergepatch" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/apiserver/pkg/admission" "k8s.io/apiserver/pkg/endpoints/handlers/negotiation" @@ -658,7 +659,7 @@ func patchResource( } } - hasConflicts, err := strategicpatch.HasConflicts(originalPatchMap, currentPatchMap) + hasConflicts, err := mergepatch.HasConflicts(originalPatchMap, currentPatchMap) if err != nil { return nil, err }