Skip to content

Fix metrics port selection in configmap

What does this MR do?

Fixes the metrics port in the configmap to actually use the value specified in values.yaml

Why was this MR needed?

Using helm install gitlab-runner . --set metrics.enabled=true --set metrics.port=12345 currently still shows the config.toml setting the listen_address value as ':9252' in the configmap manifest, while the deployment container gets the specified port, so this will break metrics scraping if a user changes the port in helm.

What's the best way to test this MR?

In main, run helm template gitlab-agent . --set metrics.enabled=true --set metrics.port=12345 and observe the listen_address value in config.toml under the configmap, then compare to the containerPort value on the deployment. Note that the listen_address remains ':9252' rather than matching the containerPort value.

Then checkout this branch, run the same command and observe the listen_address and containerPort values now match.

What are the relevant issue numbers?

Merge request reports