1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00

improve comments

This commit is contained in:
Jim Bugwadia 2020-05-17 09:54:32 -07:00
parent b463dbf6a8
commit 993bad7b65

View file

@ -21,10 +21,14 @@ import (
//TODO: generation rules //TODO: generation rules
func applyPolicy(policy kyverno.ClusterPolicy, resource unstructured.Unstructured, logger logr.Logger) (responses []response.EngineResponse) { func applyPolicy(policy kyverno.ClusterPolicy, resource unstructured.Unstructured, logger logr.Logger) (responses []response.EngineResponse) {
startTime := time.Now() startTime := time.Now()
logger.Info("start applying policy", "startTime", startTime)
defer func() { defer func() {
logger.Info("finisnhed applying policy", "processingTime", time.Since(startTime)) name := resource.GetKind() + "/" + resource.GetName()
ns := resource.GetNamespace()
if ns != "" {
name = ns + "/" + name
}
logger.V(3).Info("applyPolicy", "resource", name, "processingTime", time.Since(startTime))
}() }()
var engineResponses []response.EngineResponse var engineResponses []response.EngineResponse