31 lines
826 B
Go
31 lines
826 B
Go
//
|
|
// Copyright (c) 2012-2019 Red Hat, Inc.
|
|
// This program and the accompanying materials are made
|
|
// available under the terms of the Eclipse Public License 2.0
|
|
// which is available at https://www.eclipse.org/legal/epl-2.0/
|
|
//
|
|
// SPDX-License-Identifier: EPL-2.0
|
|
//
|
|
// Contributors: // Contributors:
|
|
// Red Hat, Inc. - initial API and implementation // Red Hat, Inc. - initial API and implementation
|
|
//
|
|
|
|
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
|
|
}
|