@@ -39,6 +39,7 @@ import (
3939 metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4040
4141 topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
42+ "github.com/openstack-k8s-operators/lib-common/modules/common/operator"
4243 mariadbv1beta1 "github.com/openstack-k8s-operators/mariadb-operator/api/v1beta1"
4344 "github.com/openstack-k8s-operators/mariadb-operator/controllers"
4445 //+kubebuilder:scaffold:imports
@@ -82,7 +83,7 @@ func main() {
8283 c .NextProtos = []string {"http/1.1" }
8384 }
8485
85- mgr , err := ctrl . NewManager ( ctrl . GetConfigOrDie (), ctrl.Options {
86+ options := ctrl.Options {
8687 Scheme : scheme ,
8788 Metrics : metricsserver.Options {
8889 BindAddress : metricsAddr ,
@@ -95,7 +96,15 @@ func main() {
9596 Port : 9443 ,
9697 TLSOpts : []func (config * tls.Config ){disableHTTP2 },
9798 }),
98- })
99+ }
100+
101+ err := operator .SetManagerOptions (& options , setupLog )
102+ if err != nil {
103+ setupLog .Error (err , "unable to set manager options" )
104+ os .Exit (1 )
105+ }
106+
107+ mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), options )
99108 if err != nil {
100109 setupLog .Error (err , "unable to start manager" )
101110 os .Exit (1 )
0 commit comments