diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index 35cc556e55b58..79f7e127bf4ee 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -1794,6 +1794,15 @@ true
 {}
 
+ + + + loki.runtimeConfig + object + Provides a reloadable runtime configuration file for some specific configuration +
+{}
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 75d532f7490a3..fff71ab443d23 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -11,6 +11,10 @@ Entries should be ordered as follows: Entries should include a reference to the pull request that introduced the change. +## 4.1.1 + +- [FEATURE] Added `loki.runtimeConfig` helm values to provide a reloadable runtime configuration. + ## 4.1 - [BUGFIX] Fix bug in provisioner job that caused the self-monitoring tenant secret to be created with an empty token. diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index a781425ccff1a..a769b344cdb86 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -4,7 +4,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.7.0 -version: 4.3.0 +version: 4.4.0 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 0487d098d46cb..b7a2175ed2d79 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 4.3.0](https://img.shields.io/badge/Version-4.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square) +![Version: 4.4.0](https://img.shields.io/badge/Version-4.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.0](https://img.shields.io/badge/AppVersion-2.7.0-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml index 716393b63e8fc..d9f6fdea44839 100644 --- a/production/helm/loki/templates/backend/statefulset-backend.yaml +++ b/production/helm/loki/templates/backend/statefulset-backend.yaml @@ -82,6 +82,8 @@ spec: volumeMounts: - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki {{- if .Values.enterprise.enabled }} @@ -114,6 +116,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime {{- if .Values.enterprise.enabled }} - name: license secret: diff --git a/production/helm/loki/templates/read/deployment-read.yaml b/production/helm/loki/templates/read/deployment-read.yaml index 231a064d24211..61b987b448a1d 100644 --- a/production/helm/loki/templates/read/deployment-read.yaml +++ b/production/helm/loki/templates/read/deployment-read.yaml @@ -90,6 +90,8 @@ spec: volumeMounts: - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config - name: tmp mountPath: /tmp - name: data @@ -128,6 +130,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime {{- if .Values.enterprise.enabled }} - name: license secret: diff --git a/production/helm/loki/templates/read/statefulset-read.yaml b/production/helm/loki/templates/read/statefulset-read.yaml index c2903d524df5f..97eaea79140f2 100644 --- a/production/helm/loki/templates/read/statefulset-read.yaml +++ b/production/helm/loki/templates/read/statefulset-read.yaml @@ -101,6 +101,8 @@ spec: volumeMounts: - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config - name: tmp mountPath: /tmp - name: data @@ -137,6 +139,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime {{- if .Values.enterprise.enabled }} - name: license secret: diff --git a/production/helm/loki/templates/runtime-configmap.yaml b/production/helm/loki/templates/runtime-configmap.yaml new file mode 100644 index 0000000000000..a8a1344c50e6c --- /dev/null +++ b/production/helm/loki/templates/runtime-configmap.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "loki.name" . }}-runtime + labels: + {{- include "loki.labels" . | nindent 4 }} +data: + runtime-config.yaml: | + {{ tpl (toYaml .Values.loki.runtimeConfig) . | nindent 4 }} diff --git a/production/helm/loki/templates/single-binary/statefulset.yaml b/production/helm/loki/templates/single-binary/statefulset.yaml index 1beaf58d22749..99789622a6745 100644 --- a/production/helm/loki/templates/single-binary/statefulset.yaml +++ b/production/helm/loki/templates/single-binary/statefulset.yaml @@ -90,6 +90,8 @@ spec: mountPath: /tmp - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config {{- if .Values.singleBinary.persistence.enabled }} - name: storage mountPath: /var/loki @@ -126,6 +128,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime {{- if .Values.enterprise.enabled }} - name: license secret: diff --git a/production/helm/loki/templates/tokengen/job-tokengen.yaml b/production/helm/loki/templates/tokengen/job-tokengen.yaml index dc9f88e5e1d15..9f1809190ef0b 100644 --- a/production/helm/loki/templates/tokengen/job-tokengen.yaml +++ b/production/helm/loki/templates/tokengen/job-tokengen.yaml @@ -60,6 +60,8 @@ spec: mountPath: /shared - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config - name: license mountPath: /etc/loki/license env: @@ -110,6 +112,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime - name: license secret: {{- if .Values.enterprise.useExternalLicense }} diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml index 21561e4bfffb7..7069a33749530 100644 --- a/production/helm/loki/templates/write/statefulset-write.yaml +++ b/production/helm/loki/templates/write/statefulset-write.yaml @@ -93,6 +93,8 @@ spec: volumeMounts: - name: config mountPath: /etc/loki/config + - name: runtime-config + mountPath: /etc/loki/runtime-config - name: data mountPath: /var/loki {{- if .Values.enterprise.enabled }} @@ -125,6 +127,9 @@ spec: configMap: name: {{ include "loki.name" . }} {{- end }} + - name: runtime-config + configMap: + name: {{ template "loki.name" . }}-runtime {{- if .Values.enterprise.enabled }} - name: license secret: diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 150044a10d1d5..cc1ee8df08a10 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -113,6 +113,9 @@ loki: {{- tpl (. | toYaml) $ | nindent 4 }} {{- end }} + runtime_config: + file: /etc/loki/runtime-config/runtime-config.yaml + {{- with .Values.loki.memcached.chunk_cache }} {{- if and .enabled (or .host .addresses) }} chunk_store_config: @@ -213,6 +216,9 @@ loki: max_cache_freshness_per_query: 10m split_queries_by_interval: 15m + # -- Provides a reloadable runtime configuration file for some specific configuration + runtimeConfig: {} + # -- Check https://grafana.com/docs/loki/latest/configuration/#common_config for more info on how to provide a common configuration commonConfig: path_prefix: /var/loki