diff --git a/main.go b/main.go index 0d292d4..c221fa7 100644 --- a/main.go +++ b/main.go @@ -33,6 +33,7 @@ import ( ramendrv1alpha1 "github.com/ramendr/recipe/api/v1alpha1" "github.com/ramendr/recipe/controllers" + metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" //+kubebuilder:scaffold:imports ) @@ -66,8 +67,10 @@ func main() { ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, + Scheme: scheme, + Metrics: metricsserver.Options{ + BindAddress: metricsAddr, + }, Port: 9443, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection,