Deploy GitHub Pages

This commit is contained in:
k8s-ci-robot 2021-01-05 14:19:07 +00:00
parent c190f071a2
commit 1f1eff8789
5 changed files with 182 additions and 54 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,203 +1,203 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
<loc>https://kubernetes.github.io/ingress-nginx/</loc> <loc>https://kubernetes.github.io/ingress-nginx/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/how-it-works/</loc> <loc>https://kubernetes.github.io/ingress-nginx/how-it-works/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/troubleshooting/</loc> <loc>https://kubernetes.github.io/ingress-nginx/troubleshooting/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/kubectl-plugin/</loc> <loc>https://kubernetes.github.io/ingress-nginx/kubectl-plugin/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/development/</loc> <loc>https://kubernetes.github.io/ingress-nginx/development/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/baremetal/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/baremetal/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/rbac/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/rbac/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/upgrade/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/upgrade/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/deploy/hardening-guide/</loc> <loc>https://kubernetes.github.io/ingress-nginx/deploy/hardening-guide/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/custom-template/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/cli-arguments/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/cli-arguments/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/custom-errors/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/default-backend/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/default-backend/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/fcgi-services/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/ingress-path-matching/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/external-articles/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/external-articles/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/miscellaneous/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/monitoring/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/monitoring/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/multiple-ingress/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/tls/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/tls/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/modsecurity/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/modsecurity/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/opentracing/</loc> <loc>https://kubernetes.github.io/ingress-nginx/user-guide/third-party-addons/opentracing/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/PREREQUISITES/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/PREREQUISITES/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/basic/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/basic/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/client-certs/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/client-certs/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/external-auth/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/external-auth/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/configuration-snippets/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/configuration-snippets/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-configuration/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-configuration/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-headers/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/custom-headers/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/external-auth-headers/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/external-auth-headers/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/ssl-dh-param/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/ssl-dh-param/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/customization/sysctl/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/customization/sysctl/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/docker-registry/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/docker-registry/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/grpc/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/grpc/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/multi-tls/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/multi-tls/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/rewrite/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/rewrite/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/static-ip/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/static-ip/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/tls-termination/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/tls-termination/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url><url> </url><url>
<loc>https://kubernetes.github.io/ingress-nginx/examples/psp/</loc> <loc>https://kubernetes.github.io/ingress-nginx/examples/psp/</loc>
<lastmod>2020-12-30</lastmod> <lastmod>2021-01-05</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

Binary file not shown.

View file

@ -690,7 +690,14 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#rate-limiting" class="md-nav__link"> <a href="#rate-limiting" class="md-nav__link">
Rate limiting Rate Limiting
</a>
</li>
<li class="md-nav__item">
<a href="#global-rate-limiting" class="md-nav__link">
Global Rate Limiting
</a> </a>
</li> </li>
@ -1660,7 +1667,14 @@
<li class="md-nav__item"> <li class="md-nav__item">
<a href="#rate-limiting" class="md-nav__link"> <a href="#rate-limiting" class="md-nav__link">
Rate limiting Rate Limiting
</a>
</li>
<li class="md-nav__item">
<a href="#global-rate-limiting" class="md-nav__link">
Global Rate Limiting
</a> </a>
</li> </li>
@ -2096,6 +2110,22 @@ table below.</p>
<td>number</td> <td>number</td>
</tr> </tr>
<tr> <tr>
<td><a href="#global-rate-limiting">nginx.ingress.kubernetes.io/global-rate-limit</a></td>
<td>number</td>
</tr>
<tr>
<td><a href="#global-rate-limiting">nginx.ingress.kubernetes.io/global-rate-limit-window</a></td>
<td>duration</td>
</tr>
<tr>
<td><a href="#global-rate-limiting">nginx.ingress.kubernetes.io/global-rate-limit-key</a></td>
<td>string</td>
</tr>
<tr>
<td><a href="#global-rate-limiting">nginx.ingress.kubernetes.io/global-rate-limit-ignored-cidrs</a></td>
<td>string</td>
</tr>
<tr>
<td><a href="#permanent-redirect">nginx.ingress.kubernetes.io/permanent-redirect</a></td> <td><a href="#permanent-redirect">nginx.ingress.kubernetes.io/permanent-redirect</a></td>
<td>string</td> <td>string</td>
</tr> </tr>
@ -2671,7 +2701,7 @@ applied to each location provided in the ingress rule.</p>
<p class="admonition-title">Note</p> <p class="admonition-title">Note</p>
<p>For more information please see <a href="../configmap/#global-auth-url">global-auth-url</a>.</p> <p>For more information please see <a href="../configmap/#global-auth-url">global-auth-url</a>.</p>
</div> </div>
<h3 id="rate-limiting">Rate limiting<a class="headerlink" href="#rate-limiting" title="Permanent link"></a></h3> <h3 id="rate-limiting">Rate Limiting<a class="headerlink" href="#rate-limiting" title="Permanent link"></a></h3>
<p>These annotations define limits on connections and transmission rates. These can be used to mitigate <a href="https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus">DDoS Attacks</a>.</p> <p>These annotations define limits on connections and transmission rates. These can be used to mitigate <a href="https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus">DDoS Attacks</a>.</p>
<ul> <ul>
<li><code>nginx.ingress.kubernetes.io/limit-connections</code>: number of concurrent connections allowed from a single IP address. A 503 error is returned when exceeding this limit.</li> <li><code>nginx.ingress.kubernetes.io/limit-connections</code>: number of concurrent connections allowed from a single IP address. A 503 error is returned when exceeding this limit.</li>
@ -2685,6 +2715,45 @@ applied to each location provided in the ingress rule.</p>
<p>If you specify multiple annotations in a single Ingress rule, limits are applied in the order <code>limit-connections</code>, <code>limit-rpm</code>, <code>limit-rps</code>.</p> <p>If you specify multiple annotations in a single Ingress rule, limits are applied in the order <code>limit-connections</code>, <code>limit-rpm</code>, <code>limit-rps</code>.</p>
<p>To configure settings globally for all Ingress rules, the <code>limit-rate-after</code> and <code>limit-rate</code> values may be set in the <a href="../configmap/#limit-rate">NGINX ConfigMap</a>. The value set in an Ingress annotation will override the global setting.</p> <p>To configure settings globally for all Ingress rules, the <code>limit-rate-after</code> and <code>limit-rate</code> values may be set in the <a href="../configmap/#limit-rate">NGINX ConfigMap</a>. The value set in an Ingress annotation will override the global setting.</p>
<p>The client IP address will be set based on the use of <a href="../configmap/#use-proxy-protocol">PROXY protocol</a> or from the <code>X-Forwarded-For</code> header value when <a href="../configmap/#use-forwarded-headers">use-forwarded-headers</a> is enabled.</p> <p>The client IP address will be set based on the use of <a href="../configmap/#use-proxy-protocol">PROXY protocol</a> or from the <code>X-Forwarded-For</code> header value when <a href="../configmap/#use-forwarded-headers">use-forwarded-headers</a> is enabled.</p>
<h3 id="global-rate-limiting">Global Rate Limiting<a class="headerlink" href="#global-rate-limiting" title="Permanent link"></a></h3>
<p><strong>Note:</strong> Be careful when configuring both (Local) Rate Limiting and Global Rate Limiting at the same time.
They are two completely different rate limiting implementations. Whichever limit exceeds first will reject the
requests. It might be a good idea to configure both of them to ease load on Global Rate Limiting backend
in cases of spike in traffic.</p>
<p>The stock NGINX rate limiting does not share its counters among different NGINX instances.
Given that most ingress-nginx deployments are elastic and number of replicas can change any day
it is impossible to configure a proper rate limit using stock NGINX functionalities.
Global Rate Limiting overcome this by using <a href="https://github.com/ElvinEfendi/lua-resty-global-throttle">lua-resty-global-throttle</a>. <code>lua-resty-global-throttle</code> shares its counters via a central store such as <code>memcached</code>.
The obvious shortcoming of this is users have to deploy and operate a <code>memcached</code> instance
in order to benefit from this functionality. Configure the <code>memcached</code>
using <a href="../configmap/#memcached">these configmap settings</a>.</p>
<p><strong>Here are a few remarks for ingress-nginx integration of <code>lua-resty-global-throttle</code>:</strong></p>
<ol>
<li>We minimize <code>memcached</code> access by caching exceeding limit decisions. The expiry of
cache entry is the desired delay <code>lua-resty-global-throttle</code> calculates for us.
The Lua Shared Dictionary used for that is <code>global_throttle_cache</code>. Currently its size defaults to 10M.
Customize it as per your needs using <a href="../configmap/#lua-shared-dicts">lua-shared-dicts</a>.
When we fail to cache the exceeding limit decision then we log an NGINX error. You can monitor
for that error to decide if you need to bump the cache size. Without cache the cost of processing a
request is two memcached commands: <code>GET</code>, and <code>INCR</code>. With the cache it is only <code>INCR</code>.</li>
<li>Log NGINX variable <code>$global_rate_limit_exceeding</code>'s value to have some visibility into
what portion of requests are rejected (value <code>y</code>), whether they are rejected using cached decision (value <code>c</code>),
or if they are not rejeced (default value <code>n</code>). You can use <a href="../configmap/#log-format-upstream">log-format-upstream</a>
to include that in access logs.</li>
<li>In case of an error it will log the error message and <strong>fail open</strong>.</li>
<li>
<p>The annotations below creates Global Rate Limiting instance per ingress.
That means if there are multuple paths configured under the same ingress,
the Global Rate Limiting will count requests to all the paths under the same counter.
Extract a path out into its own ingres if you need to isolate a certain path.</p>
</li>
<li>
<p><code>nginx.ingress.kubernetes.io/global-rate-limit</code>: Configures maximum allowed number of requests per window. Required.</p>
</li>
<li><code>nginx.ingress.kubernetes.io/global-rate-limit-window</code>: Configures a time window (i.e <code>1m</code>) that the limit is applied. Required.</li>
<li><code>nginx.ingress.kubernetes.io/global-rate-limit-key</code>: Configures a key for counting the samples. Defaults to <code>$remote_addr</code>. You can also combine multiple NGINX variables here, like <code>${remote_addr}-${http_x_api_client}</code> which would mean the limit will be applied to requests coming from the same API client (indicated by <code>X-API-Client</code> HTTP request header) with the same source IP address.</li>
<li><code>nginx.ingress.kubernetes.io/global-rate-limit-ignored-cidrs</code>: comma separated list of IPs and CIDRs to match client IP against. When there's a match request is not considered for rate limiting.</li>
</ol>
<h3 id="permanent-redirect">Permanent Redirect<a class="headerlink" href="#permanent-redirect" title="Permanent link"></a></h3> <h3 id="permanent-redirect">Permanent Redirect<a class="headerlink" href="#permanent-redirect" title="Permanent link"></a></h3>
<p>This annotation allows to return a permanent redirect (Return Code 301) instead of sending data to the upstream. For example <code>nginx.ingress.kubernetes.io/permanent-redirect: https://www.google.com</code> would redirect everything to Google.</p> <p>This annotation allows to return a permanent redirect (Return Code 301) instead of sending data to the upstream. For example <code>nginx.ingress.kubernetes.io/permanent-redirect: https://www.google.com</code> would redirect everything to Google.</p>
<h3 id="permanent-redirect-code">Permanent Redirect Code<a class="headerlink" href="#permanent-redirect-code" title="Permanent link"></a></h3> <h3 id="permanent-redirect-code">Permanent Redirect Code<a class="headerlink" href="#permanent-redirect-code" title="Permanent link"></a></h3>

View file

@ -1708,6 +1708,13 @@
default-type default-type
</a> </a>
</li>
<li class="md-nav__item">
<a href="#global-rate-limit" class="md-nav__link">
global-rate-limit
</a>
</li> </li>
</ul> </ul>
@ -3446,6 +3453,13 @@
default-type default-type
</a> </a>
</li>
<li class="md-nav__item">
<a href="#global-rate-limit" class="md-nav__link">
global-rate-limit
</a>
</li> </li>
</ul> </ul>
@ -4322,6 +4336,36 @@ Same for numbers, like "100".</p>
<td align="left">string</td> <td align="left">string</td>
<td align="left">"text/html"</td> <td align="left">"text/html"</td>
</tr> </tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-memcached-host</a></td>
<td align="left">string</td>
<td align="left">""</td>
</tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-memcached-port</a></td>
<td align="left">int</td>
<td align="left">11211</td>
</tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-memcached-connect-timeout</a></td>
<td align="left">int</td>
<td align="left">50</td>
</tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-memcached-max-idle-timeout</a></td>
<td align="left">int</td>
<td align="left">10000</td>
</tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-memcached-pool-size</a></td>
<td align="left">int</td>
<td align="left">50</td>
</tr>
<tr>
<td align="left"><a href="#global-rate-limit">global-rate-limit-status-code</a></td>
<td align="left">int</td>
<td align="left">429</td>
</tr>
</tbody> </tbody>
</table> </table>
<h2 id="add-headers">add-headers<a class="headerlink" href="#add-headers" title="Permanent link"></a></h2> <h2 id="add-headers">add-headers<a class="headerlink" href="#add-headers" title="Permanent link"></a></h2>
@ -4890,6 +4934,21 @@ It's possible to use here full strings and regular expressions. More details abo
<em><strong>default:</strong></em> text/html</p> <em><strong>default:</strong></em> text/html</p>
<p><em>References:</em> <p><em>References:</em>
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type">http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type</a></p> <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type">http://nginx.org/en/docs/http/ngx_http_core_module.html#default_type</a></p>
<h2 id="global-rate-limit">global-rate-limit<a class="headerlink" href="#global-rate-limit" title="Permanent link"></a></h2>
<ul>
<li><code>global-rate-limit-status-code</code>: configure HTTP status code to return when rejecting requests. Defaults to 429.</li>
</ul>
<p>Configure <code>memcached</code> client for <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md#global-rate-limiting">Global Rate Limiting</a>.</p>
<ul>
<li><code>global-rate-limit-memcached-host</code>: IP/FQDN of memcached server to use. Required to enable Global Rate Limiting.</li>
<li><code>global-rate-limit-memcached-port</code>: port of memcached server to use. Defaults default memcached port of <code>11211</code>.</li>
<li><code>global-rate-limit-memcached-connect-timeout</code>: configure timeout for connect, send and receive operations. Unit is millisecond. Defaults to 50ms.</li>
<li><code>global-rate-limit-memcached-max-idle-timeout</code>: configure timeout for cleaning idle connections. Unit is millisecond. Defaults to 50ms. </li>
<li><code>global-rate-limit-memcached-pool-size</code>: configure number of max connections to keep alive. Make sure your <code>memcached</code> server can handle
<code>global-rate-limit-memcached-pool-size * worker-processes * &lt;number of ingress-nginx replicas&gt;</code> simultaneous connections.</li>
</ul>
<p>These settings get used by <a href="https://github.com/ElvinEfendi/lua-resty-global-throttle">lua-resty-global-throttle</a>
that ingress-nginx includes. Refer to the link to learn more about <code>lua-resty-global-throttle</code>.</p>