From 91e1bf5fea31cf0a6e9ffb5880ef2d4e347ed034 Mon Sep 17 00:00:00 2001 From: Aline Abler Date: Fri, 20 Sep 2024 17:51:42 +0200 Subject: [PATCH] Expand environment variables in config by default --- class/defaults.yml | 6 ++++++ .../loki/templates/backend/statefulset-backend.yaml | 1 + .../10_helm_loki/loki/templates/read/deployment-read.yaml | 1 + .../loki/templates/write/statefulset-write.yaml | 1 + 4 files changed, 9 insertions(+) diff --git a/class/defaults.yml b/class/defaults.yml index 58973b1..135f3e3 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -106,6 +106,8 @@ parameters: namespaced: true backend: + extraArgs: + - '-config.expand-env=true' nodeSelector: ${loki:globalNodeSelector} replicas: 3 resources: @@ -116,6 +118,8 @@ parameters: cpu: 0.5 memory: 1Gi read: + extraArgs: + - '-config.expand-env=true' nodeSelector: ${loki:globalNodeSelector} replicas: 2 resources: @@ -126,6 +130,8 @@ parameters: cpu: 1 memory: 3Gi write: + extraArgs: + - '-config.expand-env=true' nodeSelector: ${loki:globalNodeSelector} replicas: 3 resources: diff --git a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/statefulset-backend.yaml b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/statefulset-backend.yaml index 1ef2551..0b6ca80 100644 --- a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/statefulset-backend.yaml +++ b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/backend/statefulset-backend.yaml @@ -68,6 +68,7 @@ spec: - -config.file=/etc/loki/config/config.yaml - -target=backend - -legacy-read-mode=false + - -config.expand-env=true image: docker.io/grafana/loki:3.1.1 imagePullPolicy: IfNotPresent name: loki diff --git a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/read/deployment-read.yaml b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/read/deployment-read.yaml index 3c40d71..0c0e4cf 100644 --- a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/read/deployment-read.yaml +++ b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/read/deployment-read.yaml @@ -47,6 +47,7 @@ spec: - -target=read - -legacy-read-mode=false - -common.compactor-grpc-address=loki-backend.syn-loki.svc.cluster.local:9095 + - -config.expand-env=true image: docker.io/grafana/loki:3.1.1 imagePullPolicy: IfNotPresent name: loki diff --git a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/write/statefulset-write.yaml b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/write/statefulset-write.yaml index 1cc43ef..0362a90 100644 --- a/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/write/statefulset-write.yaml +++ b/tests/golden/defaults/loki/loki/10_helm_loki/loki/templates/write/statefulset-write.yaml @@ -43,6 +43,7 @@ spec: - args: - -config.file=/etc/loki/config/config.yaml - -target=write + - -config.expand-env=true image: docker.io/grafana/loki:3.1.1 imagePullPolicy: IfNotPresent name: loki