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 authored and thjaeckle committed May 14, 2024
1 parent d98cfa6 commit f02d70d
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 @@ -30,10 +30,9 @@ data:
default_type application/json;
include mime.types;
# 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 @@ -42,7 +41,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 f02d70d

Please sign in to comment.