diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-05-21 13:52:42 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2019-05-21 14:09:00 -0700 |
commit | 1edca413dfbc05e438541929579ed7ed6aed450e (patch) | |
tree | a0627e24c5d96e3a67e4d4c90c04a20443ed060e /vnfs/DAaaS/collectd-operator/pkg | |
parent | 117240ff3abb80c8e6e9b7aee04a204e969baff4 (diff) |
CollectD Operator - Skeleton code
Skeleton code for CollectD Operator repo.
Issue-ID: ONAPARC-461
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Change-Id: I3894091cb6ec5ae11995e7914cf20e09b0def20a
Diffstat (limited to 'vnfs/DAaaS/collectd-operator/pkg')
-rw-r--r-- | vnfs/DAaaS/collectd-operator/pkg/apis/apis.go | 13 | ||||
-rw-r--r-- | vnfs/DAaaS/collectd-operator/pkg/controller/controller.go | 18 |
2 files changed, 31 insertions, 0 deletions
diff --git a/vnfs/DAaaS/collectd-operator/pkg/apis/apis.go b/vnfs/DAaaS/collectd-operator/pkg/apis/apis.go new file mode 100644 index 00000000..07dc9616 --- /dev/null +++ b/vnfs/DAaaS/collectd-operator/pkg/apis/apis.go @@ -0,0 +1,13 @@ +package apis + +import ( + "k8s.io/apimachinery/pkg/runtime" +) + +// AddToSchemes may be used to add all resources defined in the project to a Scheme +var AddToSchemes runtime.SchemeBuilder + +// AddToScheme adds all Resources to the Scheme +func AddToScheme(s *runtime.Scheme) error { + return AddToSchemes.AddToScheme(s) +} diff --git a/vnfs/DAaaS/collectd-operator/pkg/controller/controller.go b/vnfs/DAaaS/collectd-operator/pkg/controller/controller.go new file mode 100644 index 00000000..7c069f3e --- /dev/null +++ b/vnfs/DAaaS/collectd-operator/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 +} |