gitlab/gitlab-runner: Metrics listen address hard coded to IPv6, breaks hosts without IPv6
Summary
The config.toml section of the gitlab/gitlab-runner chart's ConfigMap hard codes the listen_address
to [::]:9252
. As a result, Kubernetes nodes / clusters that do not have support for IPv6 at the host level will fail when metrics.enabled: true
Steps to reproduce
Attempt to deploy gitlab/gitlab-runner
chart, with .Values.metrics.enabled: true
to a node without IPv6 support.
Actual behavior
setupMetricsAndDebugServer
(commands/multi.go L522) receives EPROTONOSUPPORT
and fails.
FATAL: Failed to create listener for metrics server builds=0 error=listen tcp [::]:9252: socket: address family not supported by protocol
Expected behavior
Metrics endpoint starts correctly. Logs "Metrics server listening"
Environment description
Self hosted, customer. Further details in Zendesk
Possible fixes
- Move to
localhost:9252
, allowing resolution via DNS for either - Implement a fallback, where if it can't find on IPv6
[::]
it re-tries on127.0.0.1
-
127.0.0.1:9252
, which could result in failures on node/clusters without IPv4
Edited by Jason Plum