1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00

annotations cleanup

This commit is contained in:
shivkumar dudhani 2019-07-25 14:18:13 -04:00
parent ba34d96c7d
commit 16dc59aedd
3 changed files with 4 additions and 2 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {