@@ -55,6 +55,7 @@ import (
5555 networkcontrollers "github.com/openstack-k8s-operators/infra-operator/controllers/network"
5656 rabbitmqcontrollers "github.com/openstack-k8s-operators/infra-operator/controllers/rabbitmq"
5757 rediscontrollers "github.com/openstack-k8s-operators/infra-operator/controllers/redis"
58+ "github.com/openstack-k8s-operators/lib-common/modules/common/operator"
5859 //+kubebuilder:scaffold:imports
5960)
6061
@@ -105,7 +106,7 @@ func main() {
105106 c .NextProtos = []string {"http/1.1" }
106107 }
107108
108- mgr , err := ctrl . NewManager ( ctrl . GetConfigOrDie (), ctrl.Options {
109+ options := ctrl.Options {
109110 Scheme : scheme ,
110111 Metrics : metricsserver.Options {
111112 BindAddress : metricsAddr ,
@@ -129,7 +130,15 @@ func main() {
129130 // if you are doing or is intended to do any operation such as perform cleanups
130131 // after the manager stops then its usage might be unsafe.
131132 // LeaderElectionReleaseOnCancel: true,
132- })
133+ }
134+
135+ err := operator .SetManagerOptions (& options , setupLog )
136+ if err != nil {
137+ setupLog .Error (err , "unable to set manager options" )
138+ os .Exit (1 )
139+ }
140+
141+ mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), options )
133142 if err != nil {
134143 setupLog .Error (err , "unable to start manager" )
135144 os .Exit (1 )
0 commit comments