Skip to content

Commit

Permalink
perf: ⚡️ pass in the ability to configure proxy-buffering (#85)
Browse files Browse the repository at this point in the history
* perf: ⚡️ pass in the ability to configure `proxy-buffering`

* fixup! perf: ⚡️ pass in the ability to configure `proxy-buffering`

* terraform-docs: automated action

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
jaskaransarkaria and github-actions[bot] authored Mar 19, 2024
1 parent 0d81756 commit dcd4c04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ No modules.
| <a name="input_memory_limits"></a> [memory\_limits](#input\_memory\_limits) | value for resources:limits memory value | `string` | `"2Gi"` | no |
| <a name="input_memory_requests"></a> [memory\_requests](#input\_memory\_requests) | value for resources:requests memory value | `string` | `"512Mi"` | no |
| <a name="input_opensearch_modsec_audit_host"></a> [opensearch\_modsec\_audit\_host](#input\_opensearch\_modsec\_audit\_host) | domain endpoint for the opensearch cluster | `string` | `""` | no |
| <a name="input_proxy_response_buffering"></a> [proxy\_response\_buffering](#input\_proxy\_response\_buffering) | nginx receives a response from the proxied server as soon as possible, saving it into the buffers set by the proxy\_buffer\_size and proxy\_buffers directives. If the whole response does not fit into memory, a part of it can be saved to a temporary file on the disk. https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering | `string` | `"off"` | no |
| <a name="input_replica_count"></a> [replica\_count](#input\_replica\_count) | Number of replicas set in deployment | `string` | n/a | yes |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ resource "helm_release" "nginx_ingress" {
enable_latest_tls = var.enable_latest_tls
enable_owasp = var.enable_owasp
keepalive = var.keepalive
proxy_response_buffering = var.proxy_response_buffering
default = var.controller_name == "default" ? true : false
name_override = "ingress-${var.controller_name}"
memory_requests = var.memory_requests
Expand Down
1 change: 1 addition & 0 deletions templates/values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ controller:
proxy-buffer-size: "16k"
proxy-body-size: "50m"
keepalive: ${keepalive}
proxy-buffering: ${proxy_response_buffering}

%{ if enable_latest_tls }
ssl-protocols: "TLSv1.2 TLSv1.3"
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ variable "keepalive" {
default = 320
}

variable "proxy_response_buffering" {
description = "nginx receives a response from the proxied server as soon as possible, saving it into the buffers set by the proxy_buffer_size and proxy_buffers directives. If the whole response does not fit into memory, a part of it can be saved to a temporary file on the disk. https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering"
type = string
default = "off"
}

variable "memory_limits" {
description = "value for resources:limits memory value"
Expand Down

0 comments on commit dcd4c04

Please sign in to comment.