Skip to content

Commit

Permalink
cluster: move metrics to 8081 port
Browse files Browse the repository at this point in the history
8080 by default used by metrics server is used
as a liveness/readiness probe address in sidecar
controller. Metrics aren't used anywhere yet, so it's
better to move it instead probes.
  • Loading branch information
zimnx committed Jan 21, 2021
1 parent 75e47b2 commit e4b34f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ func newOperatorCmd(ctx context.Context, logger log.Logger, level zap.AtomicLeve
cfg := ctrl.GetConfigOrDie()
// Create a new Cmd to provide shared dependencies and start components
mgr, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme,
Scheme: scheme,
MetricsBindAddress: fmt.Sprintf(":%d", naming.MetricsPort),
})
if err != nil {
logger.Fatal(ctx, "unable to create manager", "error", err)
Expand Down
1 change: 1 addition & 0 deletions pkg/naming/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ const (
ReadinessProbePath = "/readyz"
LivenessProbePath = "/healthz"
ProbePort = 8080
MetricsPort = 8081
)

0 comments on commit e4b34f1

Please sign in to comment.