mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
pass in original resource to validation if patches from mutation is nil
This commit is contained in:
parent
5330138048
commit
cca5dd31b6
1 changed files with 2 additions and 2 deletions
|
@ -6,8 +6,8 @@ import (
|
||||||
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1"
|
kyverno "github.com/nirmata/kyverno/pkg/api/kyverno/v1"
|
||||||
engineutils "github.com/nirmata/kyverno/pkg/engine/utils"
|
|
||||||
"github.com/nirmata/kyverno/pkg/engine/response"
|
"github.com/nirmata/kyverno/pkg/engine/response"
|
||||||
|
engineutils "github.com/nirmata/kyverno/pkg/engine/utils"
|
||||||
"k8s.io/api/admission/v1beta1"
|
"k8s.io/api/admission/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
||||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||||
|
@ -92,7 +92,7 @@ const (
|
||||||
|
|
||||||
func processResourceWithPatches(patch []byte, resource []byte) []byte {
|
func processResourceWithPatches(patch []byte, resource []byte) []byte {
|
||||||
if patch == nil {
|
if patch == nil {
|
||||||
return nil
|
return resource
|
||||||
}
|
}
|
||||||
|
|
||||||
resource, err := engineutils.ApplyPatchNew(resource, patch)
|
resource, err := engineutils.ApplyPatchNew(resource, patch)
|
||||||
|
|
Loading…
Add table
Reference in a new issue