From 41861bdacbb485ee7ccbd5b8a342c907de5fb324 Mon Sep 17 00:00:00 2001 From: Jarjar Date: Thu, 15 Sep 2022 17:12:49 +0200 Subject: [PATCH] Helm: Allows loki s3 http_config block to be configured (#7041) **What this PR does / why we need it**: This will allow users of the chart to configure the s3 http_config block as documented here [https://grafana.com/docs/loki/latest/configuration/#s3_storage_config](https://grafana.com/docs/loki/latest/configuration/#s3_storage_config) through values. **Which issue(s) this PR fixes**: Fixes grafana/helm-charts#1762 **Checklist** - [x] Documentation added - [x] Tests updated - [ ] Is this an important fix or new feature? Add an entry in the `CHANGELOG.md`. - [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/upgrading/_index.md` Signed-off-by: CAJNA Jarod --- production/helm/loki/Chart.yaml | 2 +- production/helm/loki/README.md | 4 ++-- production/helm/loki/templates/_helpers.tpl | 15 +++++++++++++++ production/helm/loki/values.yaml | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml index 01d76bad0706f..039f0d043d79c 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.6.1 -version: 3.0.5 +version: 3.0.6 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 668a0d4562650..3ddfb9a34c7a4 100644 --- a/production/helm/loki/README.md +++ b/production/helm/loki/README.md @@ -1,6 +1,6 @@ # loki -![Version: 3.0.5](https://img.shields.io/badge/Version-3.0.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square) +![Version: 3.0.6](https://img.shields.io/badge/Version-3.0.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square) Helm chart for Grafana Loki in simple, scalable mode @@ -256,7 +256,7 @@ monitoring: | loki.revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain to allow rollback | | loki.schemaConfig | object | `{}` | Check https://grafana.com/docs/loki/latest/configuration/#schema_config for more info on how to configure schemas | | loki.serverConfig | object | `{"grpc_listen_port":9095,"http_listen_port":3100}` | Check https://grafana.com/docs/loki/latest/configuration/#server for more info on the server configuration. | -| loki.storage | object | `{"bucketNames":{"admin":"admin","chunks":"chunks","ruler":"ruler"},"filesystem":{"chunks_directory":"/var/loki/chunks","rules_directory":"/var/loki/rules"},"gcs":{"chunkBufferSize":0,"enableHttp2":true,"requestTimeout":"0s"},"s3":{"accessKeyId":null,"endpoint":null,"insecure":false,"region":null,"s3":null,"s3ForcePathStyle":false,"secretAccessKey":null},"type":"s3"}` | Storage config. Providing this will automatically populate all necessary storage configs in the templated config. | +| loki.storage | object | `{"bucketNames":{"admin":"admin","chunks":"chunks","ruler":"ruler"},"filesystem":{"chunks_directory":"/var/loki/chunks","rules_directory":"/var/loki/rules"},"gcs":{"chunkBufferSize":0,"enableHttp2":true,"requestTimeout":"0s"},"s3":{"accessKeyId":null,"endpoint":null,"http_config":{},"insecure":false,"region":null,"s3":null,"s3ForcePathStyle":false,"secretAccessKey":null},"type":"s3"}` | Storage config. Providing this will automatically populate all necessary storage configs in the templated config. | | loki.storage_config | object | `{"hedging":{"at":"250ms","max_per_second":20,"up_to":3}}` | Additional storage config | | loki.structuredConfig | object | `{}` | Structured loki configuration, takes precedence over `loki.config`, `loki.schemaConfig`, `loki.storageConfig` | | minio | object | `{"buckets":[{"name":"chunks","policy":"none","purge":false},{"name":"ruler","policy":"none","purge":false},{"name":"admin","policy":"none","purge":false}],"drivesPerNode":2,"enabled":false,"persistence":{"size":"5Gi"},"replicas":1,"resources":{"requests":{"cpu":"100m","memory":"128Mi"}},"rootPassword":"supersecret","rootUser":"enterprise-logs"}` | ----------------------------------- | diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index a12171431b089..c7e20c2d423cc 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -171,6 +171,21 @@ s3: {{- end }} s3forcepathstyle: {{ .s3ForcePathStyle }} insecure: {{ .insecure }} + {{- with .http_config}} + http_config: + {{- with .idle_conn_timeout }} + idle_conn_timeout: {{ . }} + {{- end}} + {{- with .response_header_timeout }} + response_header_timeout: {{ . }} + {{- end}} + {{- with .insecure_skip_verify }} + insecure_skip_verify: {{ . }} + {{- end}} + {{- with .ca_file}} + ca_file: {{ . }} + {{- end}} + {{- end }} {{- end -}} {{- else if eq .Values.loki.storage.type "gcs" -}} {{- with .Values.loki.storage.gcs }} diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index cfad2cad85b62..91036d9101837 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -193,6 +193,7 @@ loki: accessKeyId: null s3ForcePathStyle: false insecure: false + http_config: {} gcs: chunkBufferSize: 0 requestTimeout: "0s"