Skip to content

Commit

Permalink
Make nginx timeout configurable in helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Barbul <dimabarbul@gmail.com>
  • Loading branch information
dimabarbul committed May 2, 2024
1 parent 79cafdc commit 3a798c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deployment/helm/ditto/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: |
A digital twin is a virtual, cloud based, representation of his real world counterpart
(real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations etc).
type: application
version: 3.5.4 # chart version is effectively set by release-job
version: 3.5.5-0 # chart version is effectively set by release-job
appVersion: 3.5.4
keywords:
- iot-chart
Expand Down
9 changes: 4 additions & 5 deletions deployment/helm/ditto/templates/nginx-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ data:
include mime.types;
server_tokens off;
# timeouts are configured slightly higher than ditto-eclipse-ditto-gateway read-timeout of 60 seconds
proxy_connect_timeout 70; # seconds, default: 60
proxy_send_timeout 70; # seconds, default: 60
proxy_read_timeout 70; # seconds, default: 60
proxy_connect_timeout {{ .Values.nginx.config.timeout }}; # seconds, default: 60
proxy_send_timeout {{ .Values.nginx.config.timeout }}; # seconds, default: 60
proxy_read_timeout {{ .Values.nginx.config.timeout }}; # seconds, default: 60
# will try another upstream if an error or timeout occurred during the connection
# or if the upstream returns 502 response
proxy_next_upstream error timeout http_502;
Expand All @@ -43,7 +42,7 @@ data:
# will try for max. 20s to find another upstream to connect to
proxy_next_upstream_timeout 20;
send_timeout 70; # seconds, default: 60
send_timeout {{ .Values.nginx.config.timeout }}; # seconds, default: 60
client_header_buffer_size 8k; # allow longer URIs + headers (default: 1k)
large_client_header_buffers 4 16k;
Expand Down
3 changes: 3 additions & 0 deletions deployment/helm/ditto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,9 @@ nginx:
workerProcesses: 4
# workerProcesses the 'events' 'worker_connections' option for nginx to use
workerConnections: 1024
# the 'proxy_connect_timeout', 'proxy_send_timeout', 'proxy_read_timeout' and 'send_timeout' options for nginx
# timeouts are configured slightly higher than ditto-eclipse-ditto-gateway read-timeout
timeout: 70

## ----------------------------------------------------------------------------
## Ditto UI configuration
Expand Down

0 comments on commit 3a798c6

Please sign in to comment.