Deploy GitHub Pages
This commit is contained in:
parent
ec2af1dbc3
commit
006cda8fee
62 changed files with 1885 additions and 1843 deletions
|
|
@ -34,7 +34,7 @@
|
|||
<meta name="lang:search.tokenizer" content="[\s\-]+">
|
||||
|
||||
<link rel="shortcut icon" href="../../assets/images/favicon.png">
|
||||
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.3">
|
||||
<meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.6.2">
|
||||
|
||||
|
||||
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../assets/stylesheets/application.30686662.css">
|
||||
<link rel="stylesheet" href="../../assets/stylesheets/application.adb8469c.css">
|
||||
|
||||
<link rel="stylesheet" href="../../assets/stylesheets/application-palette.a8b3c06d.css">
|
||||
|
||||
|
|
@ -53,12 +53,12 @@
|
|||
|
||||
|
||||
|
||||
<script src="../../assets/javascripts/modernizr.74668098.js"></script>
|
||||
<script src="../../assets/javascripts/modernizr.86422ebf.js"></script>
|
||||
|
||||
|
||||
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
||||
<style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
|
||||
|
||||
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||||
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
|
||||
|
||||
<a href="#ingress-path-matching" tabindex="1" class="md-skip">
|
||||
<a href="#ingress-path-matching" tabindex="0" class="md-skip">
|
||||
Skip to content
|
||||
</a>
|
||||
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
<nav class="md-header-nav md-grid">
|
||||
<div class="md-flex">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<a href="https://kubernetes.github.io/ingress-nginx" title="NGINX Ingress Controller" class="md-header-nav__button md-logo">
|
||||
<a href="https://kubernetes.github.io/ingress-nginx" title="NGINX Ingress Controller" aria-label="NGINX Ingress Controller" class="md-header-nav__button md-logo">
|
||||
|
||||
<i class="md-icon">public</i>
|
||||
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
<label class="md-search__overlay" for="__search"></label>
|
||||
<div class="md-search__inner" role="search">
|
||||
<form class="md-search__form" name="search">
|
||||
<input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
||||
<input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
|
||||
<label class="md-icon md-search__icon" for="__search"></label>
|
||||
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
|
||||

|
||||
|
|
@ -1277,17 +1277,17 @@
|
|||
<h2 id="regular-expression-support">Regular Expression Support<a class="headerlink" href="#regular-expression-support" title="Permanent link"> ¶</a></h2>
|
||||
<div class="admonition important">
|
||||
<p class="admonition-title">Important</p>
|
||||
<p>Regular expressions and wild cards are not supported in the <code class="codehilite">spec.rules.host</code> field. Full hostnames must be used.</p>
|
||||
<p>Regular expressions and wild cards are not supported in the <code class="codehilite"><span class="err">spec.rules.host</span></code> field. Full hostnames must be used.</p>
|
||||
</div>
|
||||
<p>The ingress controller supports <strong>case insensitive</strong> regular expressions in the <code class="codehilite">spec.rules.http.paths.path</code> field.
|
||||
This can be enabled by setting the <code class="codehilite">nginx.ingress.kubernetes.io/use-regex</code> annotation to <code class="codehilite">true</code> (the default is false).</p>
|
||||
<p>The ingress controller supports <strong>case insensitive</strong> regular expressions in the <code class="codehilite"><span class="err">spec.rules.http.paths.path</span></code> field.
|
||||
This can be enabled by setting the <code class="codehilite"><span class="err">nginx.ingress.kubernetes.io/use-regex</span></code> annotation to <code class="codehilite"><span class="err">true</span></code> (the default is false).</p>
|
||||
<div class="admonition hint">
|
||||
<p class="admonition-title">Hint</p>
|
||||
</div>
|
||||
<p>Kubernetes only accept expressions that comply with the RE2 engine syntax. It is possible that valid expressions accepted by NGINX cannot be used with ingress-nginx, because the PCRE library (used in NGINX) supports a wider syntax than RE2.
|
||||
See the <a href="https://github.com/google/re2/wiki/Syntax">RE2 Syntax</a> documentation for differences.</p>
|
||||
<p>See the <a href="../nginx-configuration/annotations/#use-regex">description</a> of the <code class="codehilite">use-regex</code> annotation for more details.</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
</div>
|
||||
<p>See the <a href="../nginx-configuration/annotations/#use-regex">description</a> of the <code class="codehilite"><span class="err">use-regex</span></code> annotation for more details.</p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
<span class="nt">metadata</span><span class="p">:</span>
|
||||
<span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test-ingress</span>
|
||||
|
|
@ -1302,20 +1302,20 @@ See the <a href="https://github.com/google/re2/wiki/Syntax">RE2 Syntax</a> docum
|
|||
<span class="nt">backend</span><span class="p">:</span>
|
||||
<span class="nt">serviceName</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test</span>
|
||||
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">80</span>
|
||||
</pre></div>
|
||||
</code></pre></div>
|
||||
|
||||
<p>The preceding ingress definition would translate to the following location block within the NGINX configuration for the <code class="codehilite">test.com</code> server:</p>
|
||||
<div class="codehilite"><pre><span></span>location ~* "^/foo/.*" {
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
<p>The preceding ingress definition would translate to the following location block within the NGINX configuration for the <code class="codehilite"><span class="err">test.com</span></code> server:</p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="err">location ~* "^/foo/.*" {</span>
|
||||
<span class="err"> ...</span>
|
||||
<span class="err">}</span>
|
||||
</code></pre></div>
|
||||
|
||||
<h2 id="path-priority">Path Priority<a class="headerlink" href="#path-priority" title="Permanent link"> ¶</a></h2>
|
||||
<p>In NGINX, regular expressions follow a <strong>first match</strong> policy. In order to enable more accurate path matching, ingress-nginx first orders the paths by descending length before writing them to the NGINX template as location blocks.</p>
|
||||
<p><strong>Please read the <a href="#warning">warning</a> before using regular expressions in your ingress definitions.</strong></p>
|
||||
<h3 id="example">Example<a class="headerlink" href="#example" title="Permanent link"> ¶</a></h3>
|
||||
<p>Let the following two ingress definitions be created:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<div class="codehilite"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
<span class="nt">metadata</span><span class="p">:</span>
|
||||
<span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test-ingress-1</span>
|
||||
|
|
@ -1332,9 +1332,9 @@ See the <a href="https://github.com/google/re2/wiki/Syntax">RE2 Syntax</a> docum
|
|||
<span class="nt">backend</span><span class="p">:</span>
|
||||
<span class="nt">serviceName</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">service2</span>
|
||||
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">80</span>
|
||||
</pre></div>
|
||||
</code></pre></div>
|
||||
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<div class="codehilite"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
<span class="nt">metadata</span><span class="p">:</span>
|
||||
<span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test-ingress-2</span>
|
||||
|
|
@ -1349,38 +1349,38 @@ See the <a href="https://github.com/google/re2/wiki/Syntax">RE2 Syntax</a> docum
|
|||
<span class="nt">backend</span><span class="p">:</span>
|
||||
<span class="nt">serviceName</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">service3</span>
|
||||
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">80</span>
|
||||
</pre></div>
|
||||
</code></pre></div>
|
||||
|
||||
<p>The ingress controller would define the following location blocks, in order of descending length, within the NGINX template for the <code class="codehilite">test.com</code> server:</p>
|
||||
<div class="codehilite"><pre><span></span>location ~* ^/foo/bar/.+ {
|
||||
...
|
||||
}
|
||||
<p>The ingress controller would define the following location blocks, in order of descending length, within the NGINX template for the <code class="codehilite"><span class="err">test.com</span></code> server:</p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="k">location</span> <span class="o">~*</span> <span class="o">^/</span><span class="n">foo</span><span class="o">/</span><span class="n">bar</span><span class="o">/</span><span class="p">.</span><span class="o">+</span> <span class="err">{</span>
|
||||
<span class="p">...</span>
|
||||
<span class="err">}</span>
|
||||
|
||||
location ~* "^/foo/bar/" {
|
||||
...
|
||||
}
|
||||
<span class="k">location</span> <span class="o">~*</span> <span class="ss">"^/foo/bar/"</span> <span class="err">{</span>
|
||||
<span class="p">...</span>
|
||||
<span class="err">}</span>
|
||||
|
||||
location ~* "^/foo/bar" {
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
<span class="k">location</span> <span class="o">~*</span> <span class="ss">"^/foo/bar"</span> <span class="err">{</span>
|
||||
<span class="p">...</span>
|
||||
<span class="err">}</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>The following request URI's would match the corresponding location blocks:</p>
|
||||
<ul>
|
||||
<li><code class="codehilite">test.com/foo/bar/1</code> matches <code class="codehilite">~* ^/foo/bar/.+</code> and will go to service 3.</li>
|
||||
<li><code class="codehilite">test.com/foo/bar/</code> matches <code class="codehilite">~* ^/foo/bar/</code> and will go to service 2.</li>
|
||||
<li><code class="codehilite">test.com/foo/bar</code> matches <code class="codehilite">~* ^/foo/bar</code> and will go to service 1.</li>
|
||||
<li><code class="codehilite"><span class="err">test.com/foo/bar/1</span></code> matches <code class="codehilite"><span class="err">~* ^/foo/bar/.+</span></code> and will go to service 3.</li>
|
||||
<li><code class="codehilite"><span class="err">test.com/foo/bar/</span></code> matches <code class="codehilite"><span class="err">~* ^/foo/bar/</span></code> and will go to service 2.</li>
|
||||
<li><code class="codehilite"><span class="err">test.com/foo/bar</span></code> matches <code class="codehilite"><span class="err">~* ^/foo/bar</span></code> and will go to service 1.</li>
|
||||
</ul>
|
||||
<p><strong>IMPORTANT NOTES</strong>:</p>
|
||||
<ul>
|
||||
<li>If the <code class="codehilite">use-regex</code> OR <code class="codehilite">rewrite-target</code> annotation is used on any Ingress for a given host, then the case insensitive regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a> will be enforced on ALL paths for a given host regardless of what Ingress they are defined on.</li>
|
||||
<li>If the <code class="codehilite"><span class="err">use-regex</span></code> OR <code class="codehilite"><span class="err">rewrite-target</span></code> annotation is used on any Ingress for a given host, then the case insensitive regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a> will be enforced on ALL paths for a given host regardless of what Ingress they are defined on.</li>
|
||||
</ul>
|
||||
<h2 id="warning">Warning<a class="headerlink" href="#warning" title="Permanent link"> ¶</a></h2>
|
||||
<p>The following example describes a case that may inflict unwanted path matching behaviour.</p>
|
||||
<p>This case is expected and a result of NGINX's a first match policy for paths that use the regular expression <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#location">location modifier</a>. For more information about how a path is chosen, please read the following article: <a href="https://www.digitalocean.com/community/tutorials/understanding-nginx-server-and-location-block-selection-algorithms">"Understanding Nginx Server and Location Block Selection Algorithms"</a>.</p>
|
||||
<h3 id="example_1">Example<a class="headerlink" href="#example_1" title="Permanent link"> ¶</a></h3>
|
||||
<p>Let the following ingress be defined:</p>
|
||||
<div class="codehilite"><pre><span></span><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<div class="codehilite"><pre><span></span><code><span class="nt">apiVersion</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">networking.k8s.io/v1beta1</span>
|
||||
<span class="nt">kind</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">Ingress</span>
|
||||
<span class="nt">metadata</span><span class="p">:</span>
|
||||
<span class="nt">name</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test-ingress-3</span>
|
||||
|
|
@ -1399,22 +1399,23 @@ location ~* "^/foo/bar" {
|
|||
<span class="nt">backend</span><span class="p">:</span>
|
||||
<span class="nt">serviceName</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">test</span>
|
||||
<span class="nt">servicePort</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">80</span>
|
||||
</pre></div>
|
||||
</code></pre></div>
|
||||
|
||||
<p>The ingress controller would define the following location blocks (in this order) within the NGINX template for the <code class="codehilite">test.com</code> server:</p>
|
||||
<div class="codehilite"><pre><span></span>location ~* "^/foo/bar/[A-Z0-9]{3}" {
|
||||
...
|
||||
}
|
||||
<p>The ingress controller would define the following location blocks (in this order) within the NGINX template for the <code class="codehilite"><span class="err">test.com</span></code> server:</p>
|
||||
<div class="codehilite"><pre><span></span><code><span class="k">location</span> <span class="o">~*</span> <span class="ss">"^/foo/bar/[A-Z0-9]{3}"</span> <span class="err">{</span>
|
||||
<span class="p">...</span>
|
||||
<span class="err">}</span>
|
||||
|
||||
location ~* "^/foo/bar/bar" {
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
<span class="k">location</span> <span class="o">~*</span> <span class="ss">"^/foo/bar/bar"</span> <span class="err">{</span>
|
||||
<span class="p">...</span>
|
||||
<span class="err">}</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>A request to <code class="codehilite">test.com/foo/bar/bar</code> would match the <code class="codehilite">^/foo/[A-Z0-9]{3}</code> location block instead of the longest EXACT matching path.</p>
|
||||
<p>A request to <code class="codehilite"><span class="err">test.com/foo/bar/bar</span></code> would match the <code class="codehilite"><span class="err">^/foo/[A-Z0-9]{3}</span></code> location block instead of the longest EXACT matching path.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1469,9 +1470,9 @@ location ~* "^/foo/bar/bar" {
|
|||
<div class="md-footer-copyright">
|
||||
|
||||
powered by
|
||||
<a href="https://www.mkdocs.org">MkDocs</a>
|
||||
<a href="https://www.mkdocs.org" target="_blank" rel="noopener">MkDocs</a>
|
||||
and
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
|
||||
|
|
@ -1481,7 +1482,7 @@ location ~* "^/foo/bar/bar" {
|
|||
|
||||
</div>
|
||||
|
||||
<script src="../../assets/javascripts/application.ac79c3b0.js"></script>
|
||||
<script src="../../assets/javascripts/application.c33a9706.js"></script>
|
||||
|
||||
<script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue