Skip to content

Commit ba429ab

Browse files
committed
Unset default value for GITLAB_MONITORING_IP_WHITELIST
On upstream, expected default value is `127.0.0.1/8` and it is already listed in corresponding configuration. `GITLAB_MONITORING_IP_WHITELIST` is used to allow monitoring from hosts other than loopback (localhost). So just unset default value for it. If the value is not set, the line specifying this "additional" IP range will be removed.
1 parent f9d2c98 commit ba429ab

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ Time between sampling of unicorn socket metrics, in seconds, defaults to `10`
16111611

16121612
##### `GITLAB_MONITORING_IP_WHITELIST`
16131613

1614-
IP whitelist to access monitoring endpoints, defaults to `0.0.0.0/8`
1614+
IP whitelist to access monitoring endpoints. No defaults.
16151615

16161616
##### `GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED`
16171617

assets/runtime/env-defaults

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ GITLAB_SHELL_CUSTOM_HOOKS_DIR=${GITLAB_SHELL_CUSTOM_HOOKS_DIR:-"$GITLAB_SHELL_IN
629629

630630
## MONITORING
631631
GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL=${GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL:-10}
632-
GITLAB_MONITORING_IP_WHITELIST=${GITLAB_MONITORING_IP_WHITELIST:-"0.0.0.0/8"}
632+
GITLAB_MONITORING_IP_WHITELIST=${GITLAB_MONITORING_IP_WHITELIST:-}
633633
GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED:-true}
634634
GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS:-"0.0.0.0"}
635635
GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT:-3807}

assets/runtime/functions

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ gitlab_configure_gitaly() {
351351
gitlab_configure_monitoring() {
352352
echo "Configuring gitlab::monitoring..."
353353

354+
if [ "${GITLAB_MONITORING_IP_WHITELIST}" == "" ]; then
355+
exec_as_git sed -i "/{{GITLAB_MONITORING_IP_WHITELIST}}/d" ${GITLAB_CONFIG}
356+
fi
357+
354358
update_template ${GITLAB_CONFIG} \
355359
GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL \
356360
GITLAB_MONITORING_IP_WHITELIST \

0 commit comments

Comments
 (0)