Generate operator-framework assets

This commit is contained in:
Tomasz Sęk
2018-10-24 18:15:16 +02:00
parent bee501f464
commit aa38f4c0bc
20 changed files with 1229 additions and 0 deletions
+18
View File
@@ -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
}