From 16dc59aeddbabc9a39565d3055a66a9d66af3fea Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Thu, 25 Jul 2019 14:18:13 -0400 Subject: [PATCH] annotations cleanup --- pkg/controller/cleanup.go | 4 ++++ pkg/controller/controller.go | 1 - pkg/gencontroller/generation.go | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/controller/cleanup.go b/pkg/controller/cleanup.go index feeac77fa5..48a46df60d 100644 --- a/pkg/controller/cleanup.go +++ b/pkg/controller/cleanup.go @@ -1,6 +1,8 @@ package controller import ( + "fmt" + "github.com/golang/glog" "github.com/nirmata/kyverno/pkg/annotations" v1alpha1 "github.com/nirmata/kyverno/pkg/apis/policy/v1alpha1" @@ -34,6 +36,8 @@ func cleanAnnotations(client *client.Client, obj interface{}) { glog.Error(err) continue } + fmt.Println(string(patch)) + // patch the resource _, err = client.PatchResource(obj.Resource.GetKind(), obj.Resource.GetNamespace(), obj.Resource.GetName(), patch) if err != nil { diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index d523e7e6d9..29993d6dec 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -268,7 +268,6 @@ func (pc *PolicyController) createAnnotations(policyInfos []*info.PolicyInfo) { return } - fmt.Println(string(patch)) // add the anotation to the resource _, err = pc.client.PatchResource(pi.RKind, pi.RNamespace, pi.RName, patch) if err != nil { diff --git a/pkg/gencontroller/generation.go b/pkg/gencontroller/generation.go index 6f2657cd13..7beddbbd21 100644 --- a/pkg/gencontroller/generation.go +++ b/pkg/gencontroller/generation.go @@ -149,7 +149,6 @@ func (c *Controller) createAnnotations(pi *info.PolicyInfo) { // nothing to patch return } - fmt.Println(string(gpatch)) // add the anotation to the resource _, err = c.client.PatchResource(pi.RKind, pi.RNamespace, pi.RName, gpatch) if err != nil {