Skip to content

Praefect Chart: Listen for prometheus connections on all IPs instead of localhost

Summary

When deploying praefect using the gitlab helm charts the prometheus metrics endpoint cannot be used, as it is only bound to localhost instead of 0.0.0.0. As a result, prometheus reports that the respective target(s) is/are down.

Steps to reproduce

Deploy a gitlab instance using the helm charts with preafect enabled and metrics not disabled.

Configuration used

I only copied the relevant section. In case you actually need the full config, tell me in the comments.

  praefect:
    enabled: true
    virtualStorages:
      - name: default
        gitalyReplicas: 3
        maxUnavailable: 1
    dbSecret:
      secret: praefect.gitlab-praefect-db.credentials
      key: password
    psql:
      host: gitlab-praefect-db
      sslMode: require

Current behavior

When trying to curl port <ip of praefect pod>:9236 from within the cluster I get curl: (7) Failed to connect to 10.100.164.179 port 9236: Connection refused. Prometheus reports that the target is down.

Expected behavior

The endpoint should return valid metrics data. Prometheus should be able to collect metrics from the target.

Versions

  • Chart: 4.10.2
  • Platform:
    • Self-hosted: kubeadm, baremetal
  • Kubernetes: (kubectl version)
    • Client: version.Info{Major:"1", Minor:"19+", GitVersion:"v1.19.6-rc.0", GitCommit:"e338cf2c6d297aa603b50ad3a301f761b4173aa6", GitTreeState:"archive", BuildDate:"1980-01-01T00:00:00Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}
    • Server: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.2", GitCommit:"f5743093fd1c663cb0cbc89748f730662345d44d", GitTreeState:"clean", BuildDate:"2020-09-16T13:32:58Z", GoVersion:"go1.15", Compiler:"gc", Platform:"linux/amd64"}
  • Helm: (helm version)
    • Client: version.BuildInfo{Version:"v3.3.4", GitCommit:"", GitTreeState:"", GoVersion:"go1.15.10"}
    • Server: None