@@ -44,6 +44,7 @@ import (
4444 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
4545 ironicv1 "github.com/openstack-k8s-operators/ironic-operator/api/v1beta1"
4646 keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1"
47+ "github.com/openstack-k8s-operators/lib-common/modules/common/operator"
4748 manilav1 "github.com/openstack-k8s-operators/manila-operator/api/v1beta1"
4849 mariadbv1 "github.com/openstack-k8s-operators/mariadb-operator/api/v1beta1"
4950 neutronv1 "github.com/openstack-k8s-operators/neutron-operator/api/v1beta1"
@@ -165,7 +166,7 @@ func main() {
165166 c .NextProtos = []string {"http/1.1" }
166167 }
167168
168- mgr , err := ctrl . NewManager ( ctrl . GetConfigOrDie (), ctrl.Options {
169+ options := ctrl.Options {
169170 Scheme : scheme ,
170171 Metrics : metricsserver.Options {
171172 BindAddress : metricsAddr ,
@@ -189,7 +190,15 @@ func main() {
189190 // if you are doing or is intended to do any operation such as perform cleanups
190191 // after the manager stops then its usage might be unsafe.
191192 // LeaderElectionReleaseOnCancel: true,
192- })
193+ }
194+
195+ err = operator .SetManagerOptions (& options , setupLog )
196+ if err != nil {
197+ setupLog .Error (err , "unable to set manager options" )
198+ os .Exit (1 )
199+ }
200+
201+ mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), options )
193202 if err != nil {
194203 setupLog .Error (err , "unable to start manager" )
195204 os .Exit (1 )
0 commit comments