From fce2b3cc7e4abfa4d3eec4a9684a7cdece8f2a6c Mon Sep 17 00:00:00 2001 From: Graham Rounds Date: Thu, 25 May 2023 02:09:00 -0600 Subject: [PATCH] Helm: Quote tenantId value in logsInstance (#9486) **What this PR does / why we need it**: Quotes the value of `tenantId` for the cases where tenantId is made up of only numerical values (i.e. if tenantId is `0`) the motivation for this is that we have long used the tenant id `0` in our loki instance for some stuff. We probably should fix that, but it's going to be easier (at least for us) to patch this than to rename this tenant or migrate to a new tenant. **Which issue(s) this PR fixes**: N/A - If you'd like me to file an issue to track this there as well, let me know and i'll write one up. i figured this fix was simple enough **Special notes for your reviewer**: **Checklist** - [x] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**) - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` --- production/helm/loki/CHANGELOG.md | 6 +++++- production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/monitoring/_helpers-monitoring.tpl | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index c67f7d68d9..b159fd163c 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,10 +13,13 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.) +## 5.5.5 + +- [BUGFIX] Quote tenantId value in logsInstance + ## 5.5.4 - [CHANGE] Add extraVolumeClaimTemplates for StatefulSet of the write component. -- [CHANGE] Add clusterLabelOverride for alert label overrides. ## 5.5.3 @@ -25,6 +28,7 @@ Entries should include a reference to the pull request that introduced the chang ## 5.5.2 - [BUGFIX] Use $.Release.Namespace consistently +- [CHANGE] Add clusterLabelOverride for alert label overrides. ## 5.5.1 diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index de3df17aa5..53eb136dea 100644 --- a/production/helm/loki/Chart.yaml +++ b/production/helm/loki/Chart.yaml @@ -3,7 +3,7 @@ name: loki description: Helm chart for Grafana Loki in simple, scalable mode type: application appVersion: 2.8.2 -version: 5.5.4 +version: 5.5.5 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 2d889e768e..b2b0a61603 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.5.4](https://img.shields.io/badge/Version-5.5.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) +![Version: 5.5.5](https://img.shields.io/badge/Version-5.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl index bab70ba9ae..ff3f18693a 100644 --- a/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl +++ b/production/helm/loki/templates/monitoring/_helpers-monitoring.tpl @@ -21,7 +21,7 @@ Client definition for LogsInstance name: {{ include "enterprise-logs.selfMonitoringTenantSecret" . }} key: password {{- else if .Values.loki.auth_enabled }} - tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name }} + tenantId: {{ .Values.monitoring.selfMonitoring.tenant.name | quote }} {{- end }} {{- end -}}