mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-29 10:55:05 +00:00
522 added kind prefix
This commit is contained in:
parent
af68f77b62
commit
a90999417e
1 changed files with 2 additions and 1 deletions
|
@ -47,7 +47,7 @@ func ValidatePolicyMutation(policy v1.ClusterPolicy) error {
|
|||
}
|
||||
|
||||
for kind := range allPossibleKinds {
|
||||
resource, _ := generateEmptyResource(validationGlobalState.definitions[kind]).(map[string]interface{})
|
||||
resource, _ := generateEmptyResource(validationGlobalState.definitions["io.k8s.api.core.v1."+kind]).(map[string]interface{})
|
||||
newResource := unstructured.Unstructured{Object: resource}
|
||||
policyContext := engine.PolicyContext{
|
||||
Policy: policy,
|
||||
|
@ -71,6 +71,7 @@ func ValidateResource(patchedResource interface{}, kind string) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
kind = "io.k8s.api.core.v1." + kind
|
||||
|
||||
schema := validationGlobalState.models.LookupModel(kind)
|
||||
if schema == nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue