1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-09 02:29:22 +00:00

Merge branch '455_namespace_pv' of https://github.com/nirmata/kyverno into 455_namespace_pv

# Conflicts:
#	pkg/policyviolation/generator.go
#	pkg/policyviolation/namespacedpv.go
#	pkg/webhooks/report.go
This commit is contained in:
Shuting Zhao 2019-11-12 19:18:34 -08:00
commit 7ca87b0ac6
2 changed files with 2 additions and 1 deletions

View file

@ -34,7 +34,7 @@ func BuildPolicyViolation(policy string, resource kyverno.ResourceSpec, fRules [
}
//CreatePV creates policy violation resource based on the engine responses
func CreatePV(pvLister kyvernolister.ClusterPolicyViolationLister, client *kyvernoclient.Clientset, engineResponses []engine.EngineResponse) {
func CreateClusterPV(pvLister kyvernolister.ClusterPolicyViolationLister, client *kyvernoclient.Clientset, engineResponses []engine.EngineResponse) {
var pvs []kyverno.ClusterPolicyViolation
for _, er := range engineResponses {
// ignore creation of PV for resoruces that are yet to be assigned a name

View file

@ -117,6 +117,7 @@ func (ws *WebhookServer) handleValidation(request *v1beta1.AdmissionRequest, pat
}
// ADD POLICY VIOLATIONS
// violations are created with resource on "audit"
pvInfos := generatePV(engineResponses, blocked)
ws.pvGenerator.Add(pvInfos...)
sendStat(false)