diff --git a/CHANGELOG.md b/CHANGELOG.md index adb52f36e0..0af2d44f99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Bolt** Moved additional project roots to Bolt.toml - **types** Support multiple project roots for reusing Protobuf types - **Infra** Switch from AWS ELB to NLB to work around surge queue length limitation +- **Infra** Loki resources are now configurable - **pools** Allow infinite Redis reconnection attempts - **pools** Set Redis client names - **pools** Ping Redis every 15 seconds diff --git a/infra/tf/k8s_infra/loki.tf b/infra/tf/k8s_infra/loki.tf index ed5ca2b3bb..fc432673d1 100644 --- a/infra/tf/k8s_infra/loki.tf +++ b/infra/tf/k8s_infra/loki.tf @@ -1,3 +1,13 @@ +locals { + service_loki = lookup(var.services, "loki", { + count = 1 + resources = { + cpu = 2000 + memory = 2048 + } + }) +} + resource "kubernetes_namespace" "loki" { metadata { name = "loki" @@ -35,8 +45,8 @@ resource "helm_release" "loki" { replicas = 1 resources = var.limit_resources ? { limits = { - cpu = "4" - memory = "2048Mi" + memory = "${local.service_loki.resources.memory}Mi" + cpu = "${local.service_loki.resources.cpu}m" } } : null persistence = {