mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
0ac6b0bf61
commit
65527e2b4e
3 changed files with 4 additions and 5 deletions
|
@ -32,8 +32,7 @@ func (l *loader) Load(document []byte) (schema.GroupVersionKind, unstructured.Un
|
|||
if err != nil {
|
||||
return gvk, unstructured.Unstructured{}, fmt.Errorf("failed to parse document (%w)", err)
|
||||
}
|
||||
// TODO: remove DeepCopy when fixed upstream
|
||||
if err := l.validator.Validate(result.DeepCopy()); err != nil {
|
||||
if err := l.validator.Validate(result); err != nil {
|
||||
return gvk, unstructured.Unstructured{}, fmt.Errorf("failed to validate resource (%w)", err)
|
||||
}
|
||||
return gvk, *result, nil
|
||||
|
|
2
go.mod
2
go.mod
|
@ -81,7 +81,7 @@ require (
|
|||
k8s.io/pod-security-admission v0.28.2
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
sigs.k8s.io/controller-runtime v0.16.2
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230914185012-0d8eb44296e9
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230927155409-3b3ca3ad91d0
|
||||
sigs.k8s.io/kustomize/api v0.14.0
|
||||
sigs.k8s.io/kustomize/kyaml v0.14.3
|
||||
sigs.k8s.io/release-utils v0.7.4
|
||||
|
|
4
go.sum
4
go.sum
|
@ -2435,8 +2435,8 @@ sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQ
|
|||
sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230914185012-0d8eb44296e9 h1:2SQuQcVormMzrPZyayZ2q4t1EJBe0RTtqmFozc6HQTA=
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230914185012-0d8eb44296e9/go.mod h1:9FgW8ync4Up+D1hIYTSO1vc9HkNbgm55N2iZ/LYNYxk=
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230927155409-3b3ca3ad91d0 h1:knODEtWA6f8kIafp5N07YlWQwMqrvkj5gJ9r4XcH9nI=
|
||||
sigs.k8s.io/kubectl-validate v0.0.0-20230927155409-3b3ca3ad91d0/go.mod h1:iEeHEOp73Wpn2QIDFNJcfDqebHyF7Qjilf+88WoKcWw=
|
||||
sigs.k8s.io/kustomize/api v0.14.0 h1:6+QLmXXA8X4eDM7ejeaNUyruA1DDB3PVIjbpVhDOJRA=
|
||||
sigs.k8s.io/kustomize/api v0.14.0/go.mod h1:vmOXlC8BcmcUJQjiceUbcyQ75JBP6eg8sgoyzc+eLpQ=
|
||||
sigs.k8s.io/kustomize/kyaml v0.14.3 h1:WpabVAKZe2YEp/irTSHwD6bfjwZnTtSDewd2BVJGMZs=
|
||||
|
|
Loading…
Reference in a new issue