diff options
author | 2019-07-31 15:32:28 -0700 | |
---|---|---|
committer | 2019-08-28 12:45:14 -0700 | |
commit | ab8c95eff5c1228237f758d3ccfc99c751f713f7 (patch) | |
tree | a950ac5356f547434f24c8cc3bf53f3620e84a74 /src/monitor/pkg/controller/controller.go | |
parent | dcace0784979890bb986fb078348b4b3ceef146c (diff) |
Adding monitor operator to monitor edge resources
Add an operator to monitor resources at the edge location.
The operator listens to pods and services right now and stores
their information in a CustomResource
Issue-ID: MULTICLOUD-675
Change-Id: I801478a77fcd019010ea1b4388d6077f63b89d05
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/monitor/pkg/controller/controller.go')
-rw-r--r-- | src/monitor/pkg/controller/controller.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/monitor/pkg/controller/controller.go b/src/monitor/pkg/controller/controller.go new file mode 100644 index 00000000..7c069f3e --- /dev/null +++ b/src/monitor/pkg/controller/controller.go @@ -0,0 +1,18 @@ +package controller + +import ( + "sigs.k8s.io/controller-runtime/pkg/manager" +) + +// AddToManagerFuncs is a list of functions to add all Controllers to the Manager +var AddToManagerFuncs []func(manager.Manager) error + +// AddToManager adds all Controllers to the Manager +func AddToManager(m manager.Manager) error { + for _, f := range AddToManagerFuncs { + if err := f(m); err != nil { + return err + } + } + return nil +} |