Skip to content

Commit

Permalink
perf: ⚡️ allow keepalive to be configured (#83)
Browse files Browse the repository at this point in the history
* perf: ⚡️ allow keepalive to be configured

* 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 8cd9152 commit a867e48
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ No modules.
| <a name="input_enable_owasp"></a> [enable\_owasp](#input\_enable\_owasp) | Use default ruleset from https://github.com/SpiderLabs/owasp-modsecurity-crs/ | `bool` | `false` | no |
| <a name="input_fluent_bit_version"></a> [fluent\_bit\_version](#input\_fluent\_bit\_version) | fluent bit container version used to exrtact modsec audit logs | `string` | `"2.1.8-amd64"` | no |
| <a name="input_is_live_cluster"></a> [is\_live\_cluster](#input\_is\_live\_cluster) | For live clusters externalDNS annotation will have var.live\_domain (default *.cloud-platform.service.justice.gov.uk) | `bool` | `false` | no |
| <a name="input_keepalive"></a> [keepalive](#input\_keepalive) | the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed. https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive | `number` | `0` | no |
| <a name="input_live1_cert_dns_name"></a> [live1\_cert\_dns\_name](#input\_live1\_cert\_dns\_name) | This is to add the live-1 dns name for eks-live cluster default certificate | `string` | `""` | no |
| <a name="input_live_domain"></a> [live\_domain](#input\_live\_domain) | The live domain used for externalDNS annotation | `string` | `"cloud-platform.service.justice.gov.uk"` | no |
| <a name="input_memory_limits"></a> [memory\_limits](#input\_memory\_limits) | value for resources:limits memory value | `string` | `"2Gi"` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ resource "helm_release" "nginx_ingress" {
enable_modsec = var.enable_modsec
enable_latest_tls = var.enable_latest_tls
enable_owasp = var.enable_owasp
keepalive = var.keepalive
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 @@ -167,6 +167,7 @@ controller:
generate-request-id: "true"
proxy-buffer-size: "16k"
proxy-body-size: "50m"
keepalive: ${keepalive}

%{ if enable_latest_tls }
ssl-protocols: "TLSv1.2 TLSv1.3"
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ variable "enable_external_dns_annotation" {
default = false
}

variable "keepalive" {
description = "the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed. https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive"
type = number
default = 0
}


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

0 comments on commit a867e48

Please sign in to comment.