【问题标题】:how to add entry in ingress-nginx conf file using helm chart如何使用 helm chart 在 ingress-nginx conf 文件中添加条目
【发布时间】:2019-01-29 06:00:57
【问题描述】:

想在 ingress-nginx conf 文件中添加以下条目:

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

nginx.conf 应该如下所示:

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

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

}

【问题讨论】:

    标签: nginx kubernetes-helm kubernetes-ingress nginx-ingress


    【解决方案1】:

    我不知道你为什么要通过 helm chart 来做,反正自定义 NGINX 入口有三种方法:

    1. ConfigMap:使用 Configmap 在 NGINX 中设置全局配置。
    2. Annotations:如果您想要特定 Ingress 规则的特定配置,请使用此选项。
    3. Custom template:当需要更具体的设置时,例如open_file_cache,将监听选项调整为 rcvbuf 或无法通过 ConfigMap 更改配置。

    【讨论】:

      猜你喜欢
      • 2020-05-24
      • 2022-08-18
      • 2020-10-08
      • 1970-01-01
      • 2021-08-08
      • 1970-01-01
      • 1970-01-01
      • 2020-01-09
      • 2020-04-14
      相关资源
      最近更新 更多