aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-08-10 15:15:49 -0700
committerDileep Ranganathan <dileep.ranganathan@intel.com>2019-08-12 10:51:22 -0700
commitebc40b61c64d5f06b5fe2b4d886ed4e5748db6d3 (patch)
tree57aa45894e58677d17096c7416f44b4c24c25775 /vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin
parentd59e778f2b97c96fe7f6c3945f4bb9c91ff01e74 (diff)
Collectd Operator - Added TypesDB feature support
Added support for typesDB. CollectGlobal CR can now add, update, delete TypesDB and custom TypesDB to the conf. This is achieved via creating a configmap for the types.db files and then passing the configmap name in the CR Spec. Issue-ID: ONAPARC-461 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com> Change-Id: Idb27d7981c72f67863f193bd5013f6907362ede9
Diffstat (limited to 'vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin')
-rw-r--r--vnfs/DAaaS/microservices/collectd-operator/pkg/controller/collectdplugin/collectdplugin_controller.go7
1 files changed, 2 insertions, 5 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 0e3af8d1..98d770a1 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
@@ -29,7 +29,6 @@ import (
var log = logf.Log.WithName("controller_collectdplugin")
-
// Add creates a new CollectdPlugin Controller and adds it to the Manager. The Manager will set fields on the Controller
// and Start it when the Manager is Started.
func Add(mgr manager.Manager) error {
@@ -61,7 +60,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
err = c.Watch(
&source.Kind{Type: &appsv1.DaemonSet{}},
&handler.EnqueueRequestsFromMapFunc{
- ToRequests: handler.ToRequestsFunc(func (a handler.MapObject) []reconcile.Request {
+ ToRequests: handler.ToRequestsFunc(func(a handler.MapObject) []reconcile.Request {
labelSelector, err := collectdutils.GetWatchLabels()
labels := strings.Split(labelSelector, "=")
if err != nil {
@@ -69,7 +68,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
}
rcp := r.(*ReconcileCollectdPlugin)
// Select the Daemonset with labelSelector (Defautl is app=collectd)
- if a.Meta.GetLabels()[labels[0]] == labels[1] {
+ if a.Meta.GetLabels()[labels[0]] == labels[1] {
var requests []reconcile.Request
cpList, err := collectdutils.GetCollectdPluginList(rcp.client, a.Meta.GetNamespace())
if err != nil {
@@ -91,7 +90,6 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error {
return nil
}
-
// blank assignment to verify that ReconcileCollectdPlugin implements reconcile.Reconciler
var _ reconcile.Reconciler = &ReconcileCollectdPlugin{}
@@ -103,7 +101,6 @@ type ReconcileCollectdPlugin struct {
scheme *runtime.Scheme
}
-
// Reconcile reads that state of the cluster for a CollectdPlugin object and makes changes based on the state read
// and what is in the CollectdPlugin.Spec
// TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates