From 407af9ada56da5329b219184f5bb93dce7fff362 Mon Sep 17 00:00:00 2001 From: Satyam Sundaram Date: Sat, 28 Sep 2024 07:25:38 +0000 Subject: [PATCH] feat(Helm): Allows to configure client_max_body_size --- docs/sources/setup/install/helm/reference.md | 9 +++++++++ production/helm/loki/CHANGELOG.md | 1 + production/helm/loki/templates/_helpers.tpl | 2 +- production/helm/loki/values.yaml | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md index b74a559b12e7..3e7a1cc6ce61 100644 --- a/docs/sources/setup/install/helm/reference.md +++ b/docs/sources/setup/install/helm/reference.md @@ -4213,6 +4213,15 @@ false
 {}
 
+ + + + gateway.nginxConfig.clientMaxBodySize + string + Allows customizing the `client_max_body_size` directive +
+"4M"
+
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md index 18d0aca93a3d..695b03d86635 100644 --- a/production/helm/loki/CHANGELOG.md +++ b/production/helm/loki/CHANGELOG.md @@ -24,6 +24,7 @@ Entries should include a reference to the pull request that introduced the chang ## 6.15.0 - [ENHANCEMENT] Allow setting annotations for memberlist and query-scheduler-discovery services +- [ENHANCEMENT] Allow to customize `client_max_body_size` when using Loki Gateway. #12924 ## 6.14.1 diff --git a/production/helm/loki/templates/_helpers.tpl b/production/helm/loki/templates/_helpers.tpl index 9a4ab135db92..e930432adfa5 100644 --- a/production/helm/loki/templates/_helpers.tpl +++ b/production/helm/loki/templates/_helpers.tpl @@ -733,7 +733,7 @@ http { uwsgi_temp_path /tmp/uwsgi_temp; scgi_temp_path /tmp/scgi_temp; - client_max_body_size 4M; + client_max_body_size {{ .Values.gateway.nginxConfig.clientMaxBodySize }}; proxy_read_timeout 600; ## 10 minutes proxy_send_timeout 600; diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index ab62323c95f8..050524662e6a 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -1073,6 +1073,8 @@ gateway: # -- Allows appending custom configuration to the http block, passed through the `tpl` function to allow templating httpSnippet: >- {{ if .Values.loki.tenants }}proxy_set_header X-Scope-OrgID $remote_user;{{ end }} + # -- Allows customizing the `client_max_body_size` directive + clientMaxBodySize: 4M # -- Whether ssl should be appended to the listen directive of the server block or not. ssl: false # -- Override Read URL