mirror of
https://github.com/zerotier/helm-charts.git
synced 2026-05-22 16:29:51 -07:00
set proxy & send timeouts
This commit is contained in:
@@ -15,7 +15,7 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.1
|
||||
version: 0.1.2
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
|
||||
@@ -16,6 +16,7 @@ Create your values.yaml file. The following fields are required:
|
||||
| ---------- | ----------- |
|
||||
| nginx.listenPort | The port Nginx is configured to listen on (default 8000) |
|
||||
| nginx.proxyAddress | The URL of the upstream service. (ex: `http://my-service.my-namespace.svc.cluster.local:1234`) |
|
||||
| nginx.proxyTimeout | The timeout (in seconds) for prosied requests (default 60) |
|
||||
| zerotier.identity.public | The public ZeroTier identity. Use `zerotier-idtool` to generate an identity on a per-ingress basis.|
|
||||
| zerotier.identity.secret | The secret ZeroTier identity. Use `zerotier-idtool` to generate an identity on a per-ingress basis.|
|
||||
| zerotier.networkID | The network ID the ZeroTier instance will connect to. |
|
||||
|
||||
@@ -7,5 +7,7 @@ server {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout $NGINX_PROXY_READ_TIMEOUT;
|
||||
send_timeout $NGINX_PROXY_READ_TIMEOUT;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NGINX_LISTEN_PORT="${NGINX_LISTEN_PORT:-8000}"
|
||||
NGINX_PROXY_READ_TIMEOUT=${NGINX_PROXY_READ_TIMEOUT:-60}
|
||||
|
||||
|
||||
if [ -z "$NGINX_PROXY_ADDRESS" ]; then
|
||||
echo "Error: NGINX_PROXY_ADDRESS environment variable is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
envsubst '$NGINX_LISTEN_PORT,$NGINX_PROXY_ADDRESS' < /default.conf.template > /etc/nginx/conf.d/default.conf
|
||||
envsubst '$NGINX_LISTEN_PORT,$NGINX_PROXY_ADDRESS,$NGINX_PROXY_READ_TIMEOUT' < /default.conf.template > /etc/nginx/conf.d/default.conf
|
||||
|
||||
cat /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ spec:
|
||||
value: "{{ .Values.nginx.listenPort | default 8000 }}"
|
||||
- name: NGINX_PROXY_ADDRESS
|
||||
value: {{ .Values.nginx.proxyAddress }}
|
||||
- name: NGINX_PROXY_READ_TIMEOUT
|
||||
value: "{{ .Values.nginx.proxyTimeout | default 60 }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.nginx.listenPort }}
|
||||
|
||||
@@ -13,6 +13,7 @@ nginx:
|
||||
# Set the proxy address
|
||||
# this should be the full host/port combination: http://someservice.mynamespace.svc.cluster.local:1234
|
||||
proxyAddress: ""
|
||||
proxyTimeout: 60
|
||||
|
||||
resources:
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user