mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 07:57:07 +00:00
remove commented code
This commit is contained in:
parent
639882dc06
commit
f193ad00de
1 changed files with 0 additions and 30 deletions
|
@ -380,36 +380,6 @@ func (ws *WebhookServer) bodyToAdmissionReview(request *http.Request, writer htt
|
|||
return admissionReview
|
||||
}
|
||||
|
||||
const policyKind = "Policy"
|
||||
|
||||
// func NewEventInfoFromPolicyInfo(policyInfoList []*info.PolicyInfo) []*event.Info {
|
||||
// var eventsInfo []*event.Info
|
||||
|
||||
// ok, msg := isAdmSuccesful(policyInfoList)
|
||||
// if ok {
|
||||
// for _, pi := range policyInfoList {
|
||||
// ruleNames := getRuleNames(*pi, true)
|
||||
// eventsInfo = append(eventsInfo,
|
||||
// event.NewEvent(pi.Kind, pi.Namespace+"/"+pi.Resource, event.PolicyApplied, event.SRulesApply, ruleNames, pi.Name))
|
||||
|
||||
// eventsInfo = append(eventsInfo,
|
||||
// event.NewEvent(policyKind, pi.Name, event.PolicyApplied, event.SPolicyApply, pi.Name, pi.Resource))
|
||||
|
||||
// glog.V(3).Infof("Success events info prepared for %s/%s and %s/%s\n", policyKind, pi.Name, pi.Kind, pi.Resource)
|
||||
// }
|
||||
// return eventsInfo
|
||||
// }
|
||||
|
||||
// for _, pi := range policyInfoList {
|
||||
// ruleNames := getRuleNames(*pi, false)
|
||||
// eventsInfo = append(eventsInfo,
|
||||
// event.NewEvent(policyKind, pi.Name, event.RequestBlocked, event.FPolicyApplyBlockCreate, pi.Resource, ruleNames))
|
||||
|
||||
// glog.V(3).Infof("Rule(s) %s of policy %s blocked resource creation, error: %s\n", ruleNames, pi.Name, msg)
|
||||
// }
|
||||
// return eventsInfo
|
||||
// }
|
||||
|
||||
func getRuleNames(policyInfo info.PolicyInfo, onSuccess bool) string {
|
||||
var ruleNames []string
|
||||
for _, rule := range policyInfo.Rules {
|
||||
|
|
Loading…
Add table
Reference in a new issue