diff --git a/pkg/kyverno/common/fetch.go b/pkg/kyverno/common/fetch.go index 17109e3d38..2958b734fd 100644 --- a/pkg/kyverno/common/fetch.go +++ b/pkg/kyverno/common/fetch.go @@ -32,7 +32,10 @@ func GetResources(policies []*v1.ClusterPolicy, resourcePaths []string, dClient for _, policy := range policies { for _, rule := range policy.Spec.Rules { - resourceTypesMap = getKindsFromPolicy(rule) + resourceTypesInRule := getKindsFromPolicy(rule) + for resourceKind := range resourceTypesInRule { + resourceTypesMap[resourceKind] = true + } } }