pkaramol
pkaramol

Reputation: 19352

Pass websockets and timeout values in nginx ingress controller

I want to configure the following settings in my nginx ingress controller deployment

proxy_socket_keepalive -> on 
proxy_read_timeout -> 3600
proxy_write_timeout ->3600

However I am unable to find them as annotations here, although they appear in the list of available nginx directives.

Why is that?

Upvotes: 0

Views: 2115

Answers (1)

Wytrzymały Wiktor
Wytrzymały Wiktor

Reputation: 13878

There is no proxy_write_timeout. I assume you meant the proxy_send_timeout.

Both:

nginx.ingress.kubernetes.io/proxy-send-timeout

and:

nginx.ingress.kubernetes.io/proxy-read-timeout

Can be found here and here.

As for the proxy_socket_keepalive, unfortunately, this option cannot be set via annotations. You may want to nest it in the Nginx config, for example:

location / {
     client_max_body_size 128M;
     proxy_buffer_size 256k;
     proxy_buffers 4 512k;
     proxy_busy_buffers_size 512k;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_socket_keepalive on;

Upvotes: 1

Related Questions