authenticate: fix debug and metrics endpoints (#3212)

This commit is contained in:
Caleb Doxsey 2022-03-30 09:37:37 -06:00 committed by GitHub
parent b83bb8f2f7
commit b435f73e2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 167 additions and 128 deletions

View file

@ -110,13 +110,15 @@ func NewFileOrEnvironmentSource(
return nil, err
}
ports, err := netutil.AllocatePorts(3)
ports, err := netutil.AllocatePorts(5)
if err != nil {
return nil, err
}
grpcPort := ports[0]
httpPort := ports[1]
outboundPort := ports[2]
metricsPort := ports[3]
debugPort := ports[4]
cfg := &Config{
Options: options,
@ -125,6 +127,8 @@ func NewFileOrEnvironmentSource(
GRPCPort: grpcPort,
HTTPPort: httpPort,
OutboundPort: outboundPort,
MetricsPort: metricsPort,
DebugPort: debugPort,
}
metrics.SetConfigInfo(ctx, cfg.Options.Services, "local", cfg.Checksum(), true)