andreswebs/terraform-aws-eks-monitoring

Support new Loki chart versions - Change to Values file

zfalen-deloitte opened this issue · 2 comments

level=error ts=2023-05-19T17:31:52.700290762Z caller=main.go:56 msg="validating config" err="invalid queryrange config: the yaml flag `split_queries_by_interval` must now be set in the `limits_config` section instead of the `query_range` config section"

Running on EKS 1.25.

When omitting the chart_version_loki_distributed variable, the module installs latest version of the loki-distributed helm chart by default, triggering the error above.

Working backwards all the way to 0.51.2, I was never actually able to get this working by specifying chart_version_loki_distributed. Prior to 0.51.2 a different config error is reported; this release is almost 1yr old. Not sure if this module is working on other cluster versions - but clearly has not for the distributed loki in some time.

Noted also that setting loki_mode = "single" does not deploy the standard loki chart - still deploys loki-distributed contrary to provided docs (and apparently also to the count setting in the main.tf file for resource "helm_release" "loki" { ... })

Will need to modify the modules/resources/helm-values/loki-distributed.yml.tftpl values file to move the split_queries_by_interval at this line

... into this block:

Update:

I was able to resolve Loki errors by forking and modifying the values file.

Changes:
to support permissions for WAL, set WAL to write to the volume mounted at /var/loki/ .... added to Values.loki.ingester:

      wal:
        dir: "/var/loki/wal"

Moved split_queries_by_interval to values.loki.limits_config.

Fork link:
https://github.com/zfalen-deloitte/terraform-aws-eks-monitoring/blob/main/modules/resources/helm-values/loki-distributed.yml.tftpl

Thanks!
I didn't have the bandwidth to maintain this, but glad to know you were able to work it out.