From 3667d2aa9e69136a927cf73789b23c0c0a16ae0a Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 15:04:46 -0600 Subject: [PATCH 1/7] fix(helm): only default bucket names when using minio --- production/helm/loki/templates/_helpers.tpl | 4 ++-- production/helm/loki/values.yaml | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index ac7e9717e1f2a..c1ea516096487 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -208,7 +208,7 @@ Generated storage config for loki common config {{- if .Values.minio.enabled -}} s3: endpoint: {{ include "loki.minio" $ }} - bucketnames: {{ $.Values.loki.storage.bucketNames.chunks }} + bucketnames: chunks secret_access_key: {{ $.Values.minio.rootPassword }} access_key_id: {{ $.Values.minio.rootUser }} s3forcepathstyle: true @@ -346,7 +346,7 @@ Storage config for ruler {{- if .Values.minio.enabled -}} type: "s3" s3: - bucketnames: {{ $.Values.loki.storage.bucketNames.ruler }} + bucketnames: ruler {{- else if eq .Values.loki.storage.type "s3" -}} {{- with .Values.loki.storage.s3 }} type: "s3" diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 9cf1c3fd1eefe..2b980a185e879 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -311,10 +311,6 @@ loki: compactor_address: '{{ include "loki.compactorAddress" . }}' # -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config. storage: - bucketNames: - chunks: chunks - ruler: ruler - admin: admin type: s3 s3: s3: null @@ -477,7 +473,7 @@ enterprise: admin_client: storage: s3: - bucket_name: {{ .Values.loki.storage.bucketNames.admin }} + bucket_name: admin {{- end }} {{- end }} auth: From 32ec9be9bc7e3bfcf1e15e824d86a215c1794921 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 15:17:02 -0600 Subject: [PATCH 2/7] chore: bring back bucket config with FIXMEs --- production/helm/loki/values.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 2b980a185e879..37a941565f426 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -311,6 +311,12 @@ loki: compactor_address: '{{ include "loki.compactorAddress" . }}' # -- Storage config. Providing this will automatically populate all necessary storage configs in the templated config. storage: + # Loki requires a bucket for chunks and the ruler. GEL requires a third bucket for the admin API. + # Please provide these values if you are using object storage. + # bucketNames: + # chunks: FIXME + # ruler: FIXME + # admin: FIXME type: s3 s3: s3: null From 85e987e6c3bda5828d9835ba71b2f75de0bd3335 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 15:23:04 -0600 Subject: [PATCH 3/7] fix: docs --- docs/sources/setup/install/helm/reference.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index bddda1e7e6550..7a2e697f331d0 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -2572,7 +2572,7 @@ null }, "canarySecret": null, "cluster_name": null, - "config": "{{- if .Values.enterprise.adminApi.enabled }}\n{{- if or .Values.minio.enabled (eq .Values.loki.storage.type \"s3\") (eq .Values.loki.storage.type \"gcs\") (eq .Values.loki.storage.type \"azure\") }}\nadmin_client:\n storage:\n s3:\n bucket_name: {{ .Values.loki.storage.bucketNames.admin }}\n{{- end }}\n{{- end }}\nauth:\n type: {{ .Values.enterprise.adminApi.enabled | ternary \"enterprise\" \"trust\" }}\nauth_enabled: {{ .Values.loki.auth_enabled }}\ncluster_name: {{ include \"loki.clusterName\" . }}\nlicense:\n path: /etc/loki/license/license.jwt\n", + "config": "{{- if .Values.enterprise.adminApi.enabled }}\n{{- if or .Values.minio.enabled (eq .Values.loki.storage.type \"s3\") (eq .Values.loki.storage.type \"gcs\") (eq .Values.loki.storage.type \"azure\") }}\nadmin_client:\n storage:\n s3:\n bucket_name: admin\n{{- end }}\n{{- end }}\nauth:\n type: {{ .Values.enterprise.adminApi.enabled | ternary \"enterprise\" \"trust\" }}\nauth_enabled: {{ .Values.loki.auth_enabled }}\ncluster_name: {{ include \"loki.clusterName\" . }}\nlicense:\n path: /etc/loki/license/license.jwt\n", "enabled": false, "externalConfigName": "", "externalLicenseName": null, @@ -5311,11 +5311,6 @@ null "useManagedIdentity": false, "userAssignedId": null }, - "bucketNames": { - "admin": "admin", - "chunks": "chunks", - "ruler": "ruler" - }, "filesystem": { "chunks_directory": "/var/loki/chunks", "rules_directory": "/var/loki/rules" @@ -5777,11 +5772,6 @@ null "useManagedIdentity": false, "userAssignedId": null }, - "bucketNames": { - "admin": "admin", - "chunks": "chunks", - "ruler": "ruler" - }, "filesystem": { "chunks_directory": "/var/loki/chunks", "rules_directory": "/var/loki/rules" From a726172a271e30723008c2b74870a3e00c7ec794 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 15:29:56 -0600 Subject: [PATCH 4/7] ci: fix default-single-binary-values --- production/helm/loki/ci/default-single-binary-values.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/production/helm/loki/ci/default-single-binary-values.yaml b/production/helm/loki/ci/default-single-binary-values.yaml index 9447810cfa3c6..5164bb842ba9e 100644 --- a/production/helm/loki/ci/default-single-binary-values.yaml +++ b/production/helm/loki/ci/default-single-binary-values.yaml @@ -3,6 +3,11 @@ loki: commonConfig: replication_factor: 1 useTestSchema: true + storage: + bucketNames: + chunks: chunks + ruler: ruler + admin: admin deploymentMode: SingleBinary singleBinary: replicas: 1 From 7fa71270ea859dcf085117640dee14fb8f835453 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 16:01:58 -0600 Subject: [PATCH 5/7] ci: fix a few more values --- production/helm/loki/ci/default-values.yaml | 5 +++++ production/helm/loki/ci/ingress-values.yaml | 5 +++++ production/helm/loki/ci/legacy-monitoring-values.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/production/helm/loki/ci/default-values.yaml b/production/helm/loki/ci/default-values.yaml index 9e5b90bfc2731..a79baee503989 100644 --- a/production/helm/loki/ci/default-values.yaml +++ b/production/helm/loki/ci/default-values.yaml @@ -3,6 +3,11 @@ loki: commonConfig: replication_factor: 1 useTestSchema: true + storage: + bucketNames: + chunks: chunks + ruler: ruler + admin: admin read: replicas: 1 write: diff --git a/production/helm/loki/ci/ingress-values.yaml b/production/helm/loki/ci/ingress-values.yaml index 2ca4119a8f4dc..ff5ff1efd9ce7 100644 --- a/production/helm/loki/ci/ingress-values.yaml +++ b/production/helm/loki/ci/ingress-values.yaml @@ -12,6 +12,11 @@ loki: commonConfig: replication_factor: 1 useTestSchema: true + storage: + bucketNames: + chunks: chunks + ruler: ruler + admin: admin read: replicas: 1 write: diff --git a/production/helm/loki/ci/legacy-monitoring-values.yaml b/production/helm/loki/ci/legacy-monitoring-values.yaml index a398ab7b65923..ad520e57f2f44 100644 --- a/production/helm/loki/ci/legacy-monitoring-values.yaml +++ b/production/helm/loki/ci/legacy-monitoring-values.yaml @@ -3,6 +3,11 @@ loki: commonConfig: replication_factor: 1 useTestSchema: true + storage: + bucketNames: + chunks: chunks + ruler: ruler + admin: admin read: replicas: 1 write: From 0c5fed108e53f31c0f8d2fd11563ed60d3a7d85c Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 16:19:22 -0600 Subject: [PATCH 6/7] chore: bump helm version --- production/helm/loki/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index b51eefcb29361..cf38a6dfeee16 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: 3.0.0 -version: 6.0.0 +version: 6.1.0 home: https://grafana.github.io/helm-charts sources: - https://github.com/grafana/loki From 2f1c44d2e0fd5b17889cd7c08463a013a4655269 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Tue, 9 Apr 2024 16:25:27 -0600 Subject: [PATCH 7/7] chore: add helm-docs make target --- Makefile | 3 +++ production/helm/loki/README.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9736aa461ab1c..ef8a13e5fd2ac 100644 --- a/Makefile +++ b/Makefile @@ -191,6 +191,9 @@ production/helm/loki/src/helm-test/helm-test: helm-lint: ## run helm linter $(MAKE) -BC production/helm/loki lint +helm-docs: + helm-docs -c production/helm/loki -g production/helm/loki + ################# # Loki-QueryTee # ################# diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md index 4d732d39e6eeb..f6c38c19177e7 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 6.0.0](https://img.shields.io/badge/Version-6.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) +![Version: 6.1.0](https://img.shields.io/badge/Version-6.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode