Skip to content

Commit 57c0f2c

Browse files
committed
fix(labelcontroller): disable default metrics listener to avoid port conflict
1 parent b1bd0b9 commit 57c0f2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/labelcontroller/label_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import (
3131
"sigs.k8s.io/controller-runtime/pkg/client"
3232
"sigs.k8s.io/controller-runtime/pkg/log"
3333
"sigs.k8s.io/controller-runtime/pkg/log/zap"
34+
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
3435
"sigs.k8s.io/controller-runtime/pkg/reconcile"
3536
)
3637

@@ -121,6 +122,9 @@ func Start(ctx context.Context, cloud *lustre.Cloud, mm *metrics.Manager, leader
121122
LeaderElection: true,
122123
LeaderElectionID: leaderElectionID,
123124
LeaderElectionNamespace: leaderElectionNamespace,
125+
Metrics: server.Options{
126+
BindAddress: "0",
127+
},
124128
})
125129
if err != nil {
126130
return fmt.Errorf("unable to start manager: %w", err)

0 commit comments

Comments
 (0)