Skip to content

Commit 3050c29

Browse files
kvapsclaude
andcommitted
fix: disable probe and metrics endpoints by default
The default values for --health-probe-bind-address and --metrics-bind-address were ":0", which in controller-runtime means "bind to a random free port" rather than "disabled". Because the chart runs cozy-proxy with hostNetwork=true, these showed up as two unexpected high-port listeners on the host. Switch the defaults to "0", the controller-runtime convention for disabling the server. Users who want health probes or metrics can pass an explicit bind address. Refs: #5 Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
1 parent 5655195 commit 3050c29

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ func init() {
3434
func main() {
3535
var probeAddr string
3636
var metricsAddr string
37-
flag.StringVar(&probeAddr, "health-probe-bind-address", ":0", "The address the probe endpoint binds to.")
38-
flag.StringVar(&metricsAddr, "metrics-bind-address", ":0", "The address the metric endpoint binds to.")
37+
flag.StringVar(&probeAddr, "health-probe-bind-address", "0", "The address the probe endpoint binds to. Set to \"0\" to disable.")
38+
flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metric endpoint binds to. Set to \"0\" to disable.")
3939
opts := zap.Options{
4040
Development: true,
4141
}

0 commit comments

Comments
 (0)