loki icon indicating copy to clipboard operation
loki copied to clipboard

[helm 3.0.0] ruler config

Open blezoray opened this issue 2 years ago • 2 comments

Hello,

in the previous version of the loki helm chart, it was possible to enable and configure ruler. https://github.com/grafana/helm-charts/blob/loki-2.16.0/charts/loki/values.yaml#L111

But now, it is limited with this condition : https://github.com/grafana/loki/blob/main/production/helm/loki/values.yaml#L125 And also, there is no example to uncomment to configure alertmanager, ring, ...

Is it possible to restore part of the previous helm chart in order to support single-binary and also to uncomment the different parameters ?

Rgds.

blezoray avatar Sep 09 '22 14:09 blezoray

So, we also would like to use a GCS bucket for chunks, but a configmap for rules.

But when object storage is configured with GCS it is assumed that we want to use it for rules as well:

https://github.com/grafana/loki/blob/main/production/helm/loki/templates/_helpers.tpl#L221

I think we need something similar to #7108 for ruler config.

towolf avatar Sep 14 '22 08:09 towolf

In the same context, it was possible to add custom rules in a configmap and set its name in this parameter: https://github.com/grafana/helm-charts/blob/loki-2.16.0/charts/loki/values.yaml#L342

Is it possible to keep this feature ?

blezoray avatar Sep 19 '22 15:09 blezoray

Does this PR fix this issue? https://github.com/grafana/loki/pull/7196

trevorwhitney avatar Oct 25 '22 22:10 trevorwhitney

@trevorwhitney I would say the best would be a simple option to provide for the ruler storage source as configmap + property for that config map.

Right now with custom property it needs to be set like:

ruler:
   storage:
     type: local
     local:
       directory: /etc/loki/rules
   ring:
     kvstore:
       store: memberlist
   rule_path: /tmp/loki/scratch
   alertmanager_url: http://alertmanager.svc.cluster.local:9093
   enable_alertmanager_v2: true
   enable_api: true

And extra volumes to mount config map. I think much more convenient it would be to have that possibilities out-of-the-box in chart than custom config.

pnowy avatar Jan 04 '23 08:01 pnowy

This would be easier for me to understand via a PR with the changes you desire, would you mind submitting one?

trevorwhitney avatar Jan 10 '23 20:01 trevorwhitney

THis is a very urgent problem, because I still cannot understand how to simply add the ruler config in the loki helm

alfador1 avatar Sep 06 '23 10:09 alfador1