mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 10:28:36 +00:00
construct policy Info
This commit is contained in:
parent
b0d7cdba6f
commit
d8c6dc3bc6
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,8 @@ func applyPolicy(policy kyverno.Policy, resource unstructured.Unstructured) (inf
|
|||
glog.V(4).Infof("Finished applying %s on resource %s/%s/%s (%v)", policy.Name, resource.GetKind(), resource.GetNamespace(), resource.GetName(), time.Since(startTime))
|
||||
}()
|
||||
// glog.V(4).Infof("apply policy %s with resource version %s on resource %s/%s/%s with resource version %s", policy.Name, policy.ResourceVersion, resource.GetKind(), resource.GetNamespace(), resource.GetName(), resource.GetResourceVersion())
|
||||
var policyInfo info.PolicyInfo
|
||||
policyInfo := info.NewPolicyInfo(policy.Name, resource.GetKind(), resource.GetName(), resource.GetNamespace(), policy.Spec.ValidationFailureAction)
|
||||
|
||||
//MUTATION
|
||||
mruleInfos, err := mutation(policy, resource)
|
||||
policyInfo.AddRuleInfos(mruleInfos)
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
func (pc *PolicyController) report(policyInfos []info.PolicyInfo) {
|
||||
// generate events
|
||||
// generate policy violations
|
||||
|
||||
for _, policyInfo := range policyInfos {
|
||||
// events
|
||||
// success - policy applied on resource
|
||||
|
|
Loading…
Add table
Reference in a new issue