Ingress-nginx: Configmap update has no effect on controllers config

Created on 6 Jun 2019  路  3Comments  路  Source: kubernetes/ingress-nginx

Hi,
I'am using the v0.24.1.
I'd like to add some custom configuration like this in the configmap (via kubectl edit configmap) :

data:
  client_header_buffer_size: "5120k"
  large_client_header_buffers: "4 5120k"
  proxy-connect-timeout: "3600"
  proxy-read-timeout: "3600"
  proxy-send-timeout: "3600"
  ...

I'd just like to modify client client_header_buffer_size and large_client_header_buffers values.

But when I apply this changes, I see that the controller triggered the configmap update, but when I check inside the POD in /etc/nginx/nginx.conf file, I always have default values :

...
client_header_buffer_size       1k;
large_client_header_buffers     4 8k;
...

The only strange thing I see when I edit the configmap again, is that I lost the double-quotes arround my values :

data:
  client_header_buffer_size: 5120k
  large_client_header_buffers: 4 5120k
  proxy-connect-timeout: "3600"
  proxy-read-timeout: "3600"
  proxy-send-timeout: "3600"

If I try to put them back, the yaml seems to be ok, I have no error, but it has no effect.

Any idea?

Most helpful comment

FWIW, I had to do a kubectl rollout restart of the nginx-ingress-controller daemonset in order to make changes to the configmap stick.

All 3 comments

Another strange thing is that if I modify proxy_connect_timeout (from 3600 to 600) in my configmap via kubectl edit, it works.

Is there some syntax error with values like "4 8k" or "1024k" ? I cannot see anything in logs

Ok, my bad. There is some vicious differences between the nginx official documentation and nginx Ingress controller documentation.

In Nginx there is a client_header_buffer_size property and its equivalent in Nginx Ingress Controller is client-header-buffer-size

:see_no_evil: :hear_no_evil: :speak_no_evil:

FWIW, I had to do a kubectl rollout restart of the nginx-ingress-controller daemonset in order to make changes to the configmap stick.

Was this page helpful?
0 / 5 - 0 ratings