From d1dee9150b0e69941b2bd3ce4b23afead174ea29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Tr=E1=BB=8Dng=20H=E1=BA=A3i?= <41283691+hainenber@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:20:01 +0700 Subject: [PATCH] feat(helm): configurable API version for PodLog CRD (#10812) **What this PR does / why we need it**: **Which issue(s) this PR fixes**: Fixes #10757 **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 - [ ] Tests updated - [x] `CHANGELOG.md` updated - [ ] If the change is worth mentioning in the release notes, add `add-to-release-notes` label - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/setup/upgrade/_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) --------- Signed-off-by: hainenber Co-authored-by: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> --- docs/sources/setup/install/helm/reference.md | 9 +++++++++ production/helm/loki/CHANGELOG.md | 4 ++++ production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 2 +- production/helm/loki/templates/monitoring/pod-logs.yaml | 2 +- production/helm/loki/values.yaml | 2 ++ 6 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index cf20e1486e22..40ef93c1d75a 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -2747,6 +2747,15 @@ null
 {}
 
+ + + + monitoring.selfMonitoring.podLogs.apiVersion + string + PodLogs version +
+"monitoring.grafana.com/v1alpha1"
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 61f132474a82..9cdf1956a4e8 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.29.0 + +- [ENHANCEMENT] Allow specifying `apiVersion` for Loki's PodLog CRD. + ## 5.28.0 - [BUGFIX] Fix GrafanaAgent tolerations scope diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index e42540d27622..9a028c454b19 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.9.1 -version: 5.28.0 +version: 5.29.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 05d909ef8f3a..ede6e9416215 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 5.28.0](https://img.shields.io/badge/Version-5.28.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square) +![Version: 5.29.0](https://img.shields.io/badge/Version-5.29.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode diff --git a/production/helm/loki/templates/monitoring/pod-logs.yaml b/production/helm/loki/templates/monitoring/pod-logs.yaml index 4fa4d836fbce..4445f3e76077 100644 --- a/production/helm/loki/templates/monitoring/pod-logs.yaml +++ b/production/helm/loki/templates/monitoring/pod-logs.yaml @@ -1,7 +1,7 @@ --- {{- if .Values.monitoring.selfMonitoring.enabled }} {{- with .Values.monitoring.selfMonitoring.podLogs }} -apiVersion: monitoring.grafana.com/v1alpha1 +apiVersion: {{ .apiVersion }} kind: PodLogs metadata: name: {{ include "loki.fullname" $ }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 65f5473f36f2..a45a90498eb7 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -635,6 +635,8 @@ monitoring: tolerations: [] # PodLogs configuration podLogs: + # -- PodLogs version + apiVersion: monitoring.grafana.com/v1alpha1 # -- PodLogs annotations annotations: {} # -- Additional PodLogs labels