diff --git a/README.md b/README.md index 1e5939b0..23f2c185 100644 --- a/README.md +++ b/README.md @@ -1611,7 +1611,7 @@ Time between sampling of unicorn socket metrics, in seconds, defaults to `10` ##### `GITLAB_MONITORING_IP_WHITELIST` -IP whitelist to access monitoring endpoints, defaults to `0.0.0.0/8` +IP whitelist to access monitoring endpoints. No defaults. ##### `GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED` diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 7c6de6d9..14e0ccc1 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -629,7 +629,7 @@ GITLAB_SHELL_CUSTOM_HOOKS_DIR=${GITLAB_SHELL_CUSTOM_HOOKS_DIR:-"$GITLAB_SHELL_IN ## MONITORING GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL=${GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL:-10} -GITLAB_MONITORING_IP_WHITELIST=${GITLAB_MONITORING_IP_WHITELIST:-"0.0.0.0/8"} +GITLAB_MONITORING_IP_WHITELIST=${GITLAB_MONITORING_IP_WHITELIST:-} GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED:-true} GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS:-"0.0.0.0"} GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT:-3807} diff --git a/assets/runtime/functions b/assets/runtime/functions index 4f7908bb..be6a0133 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -351,6 +351,10 @@ gitlab_configure_gitaly() { gitlab_configure_monitoring() { echo "Configuring gitlab::monitoring..." + if [ "${GITLAB_MONITORING_IP_WHITELIST}" == "" ]; then + exec_as_git sed -i "/{{GITLAB_MONITORING_IP_WHITELIST}}/d" ${GITLAB_CONFIG} + fi + update_template ${GITLAB_CONFIG} \ GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL \ GITLAB_MONITORING_IP_WHITELIST \