{{< details >}}

  1. Tier: 基础版, 专业版, 旗舰版
  2. Offering: 私有化部署

{{< /details >}}

IP 允许列表

极狐GitLab 提供一些监控端点,在探测时提供健康检查信息。

要通过 IP 允许列表控制对这些端点的访问,可以添加单个主机或使用 IP 范围:

{{< tabs >}}

{{< tab title=”Linux package (Omnibus)” >}}

  1. 打开 /etc/gitlab/gitlab.rb 并添加或取消注释以下内容:

    gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
    
  2. 保存文件并重新配置极狐GitLab 以使更改生效。

{{< /tab >}}

{{< tab title=”Helm chart (Kubernetes)” >}}

可以在 gitlab.webservice.monitoring.ipWhitelist 键下设置所需的 IP。例如:

gitlab:
   webservice:
      monitoring:
         # Monitoring IP allowlist
         ipWhitelist:
         - 0.0.0.0/0 # Default

{{< /tab >}}

{{< tab title=”Self-compiled (source)” >}}

  1. 编辑 config/gitlab.yml

    monitoring:
      # by default only local IPs are allowed to access monitoring resources
      ip_whitelist:
        - 127.0.0.0/8
        - 192.168.0.1
    
  2. 保存文件并重启极狐GitLab 以使更改生效。

{{< /tab >}}

{{< /tabs >}}