skip GRs for spec being same in old and updated policy
package generate
import (
+ "reflect"
"time"
"github.com/go-logr/logr"
@@ -175,6 +176,10 @@ func (c *Controller) updatePolicy(old, cur interface{}) {
}
}
+ if reflect.DeepEqual(curP.Spec, oldP.Spec) {
+ policyHasGenerate = false
+ }
+
if !policyHasGenerate {
return
}
