From 80e13492cbe739ffde8ea548c04a62a35700aa5e Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 7 Feb 2023 13:02:16 -0700 Subject: [PATCH] Fix namespace rendering in provisioner job (#8449) --- production/helm/loki/CHANGELOG.md | 4 ++++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/provisioner/job-provisioner.yaml | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 8ed3f3db2ce52..e0ad970fe13fa 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang [//]: # ( : do not remove this line. Add your changelog bellow this line. This locator is used by CI pipeline to find the place where to put changelog entry.) +## 4.5.1 + +- [BUGFIX] Fix rendering of namespace in provisioner job. + ## 4.5 - [ENHANCEMENT] Single binary mode is now possible for more than 1 replica, with a gateway and object storage backend. diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 6bd6d0b336ef0..51c14a4794bf7 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.2 -version: 4.5.0 +version: 4.5.1 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 56d88e12e0359..e475b84d894f7 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 4.5.0](https://img.shields.io/badge/Version-4.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.2](https://img.shields.io/badge/AppVersion-2.7.2-informational?style=flat-square) +![Version: 4.5.1](https://img.shields.io/badge/Version-4.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.7.2](https://img.shields.io/badge/AppVersion-2.7.2-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/provisioner/job-provisioner.yaml b/production/helm/loki/templates/provisioner/job-provisioner.yaml index 626fa592337ee..0845009fb3f65 100644 --- a/production/helm/loki/templates/provisioner/job-provisioner.yaml +++ b/production/helm/loki/templates/provisioner/job-provisioner.yaml @@ -99,11 +99,12 @@ spec: {{- end }} {{- $namespace := $.Release.Namespace }} {{- with .Values.monitoring.selfMonitoring.tenant }} + {{- $secretNamespace := tpl .secretNamespace $ }} kubectl --namespace "{{ $namespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ --from-literal=username="{{ .name }}" \ --from-literal=password="$(cat /bootstrap/token-self-monitoring)" - {{- if not (eq .secretNamespace $namespace) }} - kubectl --namespace "{{ .secretNamespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ + {{- if not (eq $secretNamespace $namespace) }} + kubectl --namespace "{{ $secretNamespace }}" create secret generic "{{ include "enterprise-logs.selfMonitoringTenantSecret" $ }}" \ --from-literal=username="{{ .name }}" \ --from-literal=password="$(cat /bootstrap/token-self-monitoring)" {{- end }}