mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-15 17:51:20 +00:00
improve comments
This commit is contained in:
parent
b463dbf6a8
commit
993bad7b65
1 changed files with 7 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue