how to add entry in ingress-nginx conf file using helm chart

1/29/2019

Want to add the below entry in ingress-nginx conf file:

limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;

nginx.conf should look like:

limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;

  server {
  # ...
   location /login.html {
       limit_req zone=one;
  # ...
  }

}

-- Vikki
kubernetes-helm
kubernetes-ingress
nginx
nginx-ingress

1 Answer

1/30/2019

I am not sure why you want to do it via helm chart, anyway there are three ways to customize NGINX ingress:

  1. ConfigMap: using a Configmap to set global configurations in NGINX.
  2. Annotations: use this if you want a specific configuration for a particular Ingress rule.
  3. Custom template: when more specific settings are required, like open_file_cache, adjust listen options as rcvbuf or when is not possible to change the configuration through the ConfigMap.
-- coolinuxoid
Source: StackOverflow