1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-08 10:04:25 +00:00

Merge pull request #618 from nirmata/617_bug

pass in original resource to validation if patches from mutation is nil
This commit is contained in:
shuting 2020-01-13 10:42:11 -08:00 committed by GitHub
commit d06fa48648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,8 +6,8 @@ import (
"github.com/golang/glog"
kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1"
engineutils "github.com/nirmata/kyverno/pkg/engine/utils"
"github.com/nirmata/kyverno/pkg/engine/response"
engineutils "github.com/nirmata/kyverno/pkg/engine/utils"
"k8s.io/api/admission/v1beta1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
@ -92,7 +92,7 @@ const (
func processResourceWithPatches(patch []byte, resource []byte) []byte {
if patch == nil {
return nil
return resource
}
resource, err := engineutils.ApplyPatchNew(resource, patch)