summaryrefslogtreecommitdiffstats
path: root/vnfs
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-08-07 11:43:43 -0700
committerMarco Platania <platania@research.att.com>2019-08-11 21:55:25 +0000
commit3d1e26dc3e9af8cc066bef9971bb870b841c903b (patch)
tree31a433315201719f1d314a28ad224fba3d6e127d /vnfs
parent787f229616b7d26d4a712288018b83c8de6d900c (diff)
Added GenerationChangePredicate for CollectdPlugin
Added Predicate to discard events for status update Issue-ID: ONAPARC-461 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com> Change-Id: I867b321de4b0a461ec6d0264e98761b5cdc01b77
Diffstat (limited to 'vnfs')
-rw-r--r--vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go b/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go
index 4ce32eb2..c9b8ab1c 100644
--- a/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go
+++ b/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go
@@ -7,6 +7,7 @@ import (
"strings"
"github.com/go-logr/logr"
+ "github.com/operator-framework/operator-sdk/pkg/predicate"
onapv1alpha1 "demo/vnfs/DAaaS/microservices/collectd-operator/pkg/apis/onap/v1alpha1"
collectdutils "demo/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/utils"
@@ -51,7 +52,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
// Watch for changes to primary resource CollectdPlugin
log.V(1).Info("Add watcher for primary resource CollectdPlugin")
- err = c.Watch(&source.Kind{Type: &onapv1alpha1.CollectdPlugin{}}, &handler.EnqueueRequestForObject{})
+ err = c.Watch(&source.Kind{Type: &onapv1alpha1.CollectdPlugin{}}, &handler.EnqueueRequestForObject{}, predicate.GenerationChangedPredicate{})
if err != nil {
return err
}