You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 17, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: ingress/controllers/nginx/README.md
+17-1
Original file line number
Diff line number
Diff line change
@@ -196,6 +196,23 @@ Use the [custom-template](examples/custom-template/README.md) example as a guide
196
196
**Please note the template is tied to the go code. Be sure to no change names in the variable `$cfg`**
197
197
198
198
199
+
### Custom NGINX upstream checks
200
+
201
+
NGINX exposes some flags in the [upstream configuration](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) that enabled configuration of each server in the upstream. The ingress controller allows custom `max_fails` and `fail_timeout` parameters in a global context using `upstream-max-fails` or `upstream-fail-timeout` in the NGINX Configmap or in a particular Ingress rule. By default this values are 0. This means NGINX will respect the `livenessProbe`, if is defined. If there is no probe, NGINX will not mark a server inside an upstream down.
202
+
203
+
To use custom values in an Ingress rule define this annotations:
204
+
205
+
`ingress-nginx.kubernetes.io/upstream-max-fails`: number of unsuccessful attempts to communicate with the server that should happen in the duration set by the fail_timeout parameter to consider the server unavailable
206
+
207
+
`ingress-nginx.kubernetes.io/upstream-fail-timeout`: time in seconds during which the specified number of unsuccessful attempts to communicate with the server should happen to consider the server unavailable. Also the period of time the server will be considered unavailable.
208
+
209
+
**Important:**
210
+
The upstreams are shared. i.e. Ingress rule using the same service will use the same upstream.
211
+
This means only one of the rules should define annotations to configure the upstream servers
212
+
213
+
214
+
Please check the [auth](examples/custom-upstream-check/README.md) example
215
+
199
216
200
217
### NGINX status page
201
218
@@ -209,7 +226,6 @@ Please check the example `example/rc-default.yaml`
209
226
To extract the information in JSON format the module provides a custom URL: `/nginx_status/format/json`
210
227
211
228
212
-
213
229
### Custom errors
214
230
215
231
In case of an error in a request the body of the response is obtained from the `default backend`. Each request to the default backend includes two headers:
0 commit comments