Skip to content

Commit

Permalink
Start both auto and federated service monitor controller
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jan 28, 2024
1 parent 5522257 commit 9012417
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 4 additions & 9 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,19 @@ func (c completedConfig) New(ctx context.Context) (*UIServer, error) {
Group: monitoring.GroupName,
Kind: monitoringv1.ServiceMonitorsKind,
}, func(ctx context.Context, mgr ctrl.Manager) {
if err = servicemonitorcontroller.NewFederationReconciler(
if err = servicemonitorcontroller.NewAutoReconciler(
c.ExtraConfig.ClientConfig,
mgr.GetClient(),
).SetupWithManager(mgr); err != nil {
klog.Error(err, "unable to create controller", " federation controller", "ServiceMonitor")
klog.Error(err, "unable to create controller", "auto controller", "ServiceMonitor")
os.Exit(1)
}
})

apiextensions.RegisterSetup(schema.GroupKind{
Group: monitoring.GroupName,
Kind: monitoringv1.ServiceMonitorsKind,
}, func(ctx context.Context, mgr ctrl.Manager) {
if err = servicemonitorcontroller.NewAutoReconciler(
if err = servicemonitorcontroller.NewFederationReconciler(
c.ExtraConfig.ClientConfig,
mgr.GetClient(),
).SetupWithManager(mgr); err != nil {
klog.Error(err, "unable to create controller", "auto controller", "ServiceMonitor")
klog.Error(err, "unable to create controller", " federation controller", "ServiceMonitor")
os.Exit(1)
}
})
Expand Down
1 change: 0 additions & 1 deletion pkg/cmds/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
)

func NewCmdOperator(ctx context.Context) *cobra.Command {
// o := server.NewOperatorOptions()
o := server.NewOperatorOptions()

cmd := &cobra.Command{
Expand Down

0 comments on commit 9012417

Please sign in to comment.