added namespace label in context
@@ -62,6 +62,7 @@ func applyPolicy(policy kyverno.ClusterPolicy, resource unstructured.Unstructure
ResourceCache: resCache,
JSONContext: ctx,
Client: client,
+ NamespaceLabels: namespaceLabels,
}
engineResponseValidation = engine.Validate(policyCtx)
