1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +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
func applyPolicy(policy kyverno.ClusterPolicy, resource unstructured.Unstructured, logger logr.Logger) (responses []response.EngineResponse) {
startTime := time.Now()
logger.Info("start applying policy", "startTime", startTime)
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