Skip to content

Bug: Helm value api.prometheus_http_prefix for grafana-distributed not working as documented #10786

Open
@Jeansen

Description

@Jeansen

What is the bug?

If I set the following in the values file:

mimir:
  structuredConfig:
    api:
      prometheus_http_prefix: ''

Then, the endpoint in ConfigMap grafana-mimir-gateway-nginx is still the default prometheus:

  # Rest of /prometheus goes to the query frontend
    location /prometheus {
      set $query_frontend grafana-mimir-query-frontend.default.svc.cluster.local.;
      proxy_pass      http://$query_frontend:8080$request_uri;
    }

How to reproduce it?

Deploy Mimir an make sure this excerpt is added to values.yaml:

mimir:
  structuredConfig:
    api:
      prometheus_http_prefix: ''

When Deployed, check ConfigMap grafana-mimir-gateway-nginx and look for the part containing

  # Rest of /prometheus goes to the query frontend
    location /prometheus {
    ...
    }

What did you think would happen?

I would expect that the ConfigMap grafana-mimir-gateway-nginx to have the following entry:

    location / {
      set $query_frontend grafana-mimir-query-frontend.default.svc.cluster.local.;
      proxy_pass      http://$query_frontend:8080$request_uri;
    }

But instead, it is still has the default prefix:

  # Rest of /prometheus goes to the query frontend
    location /prometheus {
      set $query_frontend grafana-mimir-query-frontend.default.svc.cluster.local.;
      proxy_pass      http://$query_frontend:8080$request_uri;
    }

I followed https://github.com/grafana/mimir/blob/main/docs/sources/mimir/configure/configure-the-query-frontend-work-with-prometheus.md

What was your environment?

Kubernetes 1.32.0,
Helm: v3.17.1+g980d8ac
Mimir Helm release: grafana/mimir-distributed 5.6.0 2.15.0

Any additional context to share?

If prometheus_http_prefix: "/" is set, then it works as expected.

So, either this is a bug or documentation needs an update/review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelm

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions