Skip to content

Commit

Permalink
Helm: Allows loki s3 http_config block to be configured (grafana#7041)
Browse files Browse the repository at this point in the history
**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 <[email protected]>
  • Loading branch information
j4rj4r authored Sep 15, 2022
1 parent 127ba53 commit 3d5418b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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"}` | ----------------------------------- |
Expand Down
15 changes: 15 additions & 0 deletions production/helm/loki/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ loki:
accessKeyId: null
s3ForcePathStyle: false
insecure: false
http_config: {}
gcs:
chunkBufferSize: 0
requestTimeout: "0s"
Expand Down

0 comments on commit 3d5418b

Please sign in to comment.