From 08e741b7c604cf397d7d2f3dd417cb8a067dde91 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Fri, 21 Jul 2023 07:05:49 -0300 Subject: [PATCH] helm: Allow altering the canary label name (#9945) **What this PR does / why we need it**: Allows changing the label name at the canary in the helm chart. **Which issue(s) this PR fixes**: Idk, none? **Special notes for your reviewer**: This is a very trivial change. **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] If the change is worth mentioning in the release notes, add `add-to-release-notes` label - [x] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` - [x] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213) --------- Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Co-authored-by: Travis Patterson --- docs/sources/installation/helm/reference.md | 9 +++++++++ production/helm/loki/CHANGELOG.md | 4 ++++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- .../helm/loki/templates/loki-canary/daemonset.yaml | 2 +- production/helm/loki/values.yaml | 2 ++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/sources/installation/helm/reference.md b/docs/sources/installation/helm/reference.md index df6af712a1..a5fab6deed 100644 --- a/docs/sources/installation/helm/reference.md +++ b/docs/sources/installation/helm/reference.md @@ -2411,6 +2411,15 @@ null
 null
 
+ + + + monitoring.lokiCanary.labelname + string + The name of the label to look for at loki when doing the checks. +
+"pod"
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 2004fb1afb..3f54febb61 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. 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.8.10 + +- [ENHANCEMENT] Canary labelname can now be configured via monitoring.lokiCanary.labelname + ## 5.8.9 - [BUGFIX] Fix loki/logs dashboard: allow querying multiple log level at once diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index f9073a54c4..a65c76cb72 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.8.9 +version: 5.8.10 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 51a0fb7630..2d4efda1ea 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.8.9](https://img.shields.io/badge/Version-5.8.9-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.8.10](https://img.shields.io/badge/Version-5.8.10-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/loki-canary/daemonset.yaml b/production/helm/loki/templates/loki-canary/daemonset.yaml index c127ced279..89c5e6f401 100644 --- a/production/helm/loki/templates/loki-canary/daemonset.yaml +++ b/production/helm/loki/templates/loki-canary/daemonset.yaml @@ -42,7 +42,7 @@ spec: imagePullPolicy: {{ $.Values.loki.image.pullPolicy }} args: - -addr={{- include "loki.host" $ }} - - -labelname=pod + - -labelname={{ .labelname }} - -labelvalue=$(POD_NAME) {{- if $.Values.enterprise.enabled }} - -user=$(USER) diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 67e4aac2e8..2e0fdf88d2 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -637,6 +637,8 @@ monitoring: # that it's working correctly lokiCanary: enabled: true + # -- The name of the label to look for at loki when doing the checks. + labelname: pod # -- Additional annotations for the `loki-canary` Daemonset annotations: {} # -- Additional labels for each `loki-canary` pod