Deploy GitHub Pages

This commit is contained in:
Travis Bot 2019-03-28 01:07:46 +00:00
parent 58a63832d9
commit 53ffacf4b2
6 changed files with 81 additions and 72 deletions

View file

@ -129,7 +129,7 @@
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <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> <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#sticky-session" tabindex="1" class="md-skip"> <a href="#sticky-sessions" tabindex="1" class="md-skip">
Skip to content Skip to content
</a> </a>
@ -1172,48 +1172,53 @@
<a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/affinity/cookie/README.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a> <a href="https://github.com/kubernetes/ingress-nginx/edit/master/docs/examples/affinity/cookie/README.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>
<h1 id="sticky-session">Sticky Session<a class="headerlink" href="#sticky-session" title="Permanent link">&para;</a></h1> <h1 id="sticky-sessions">Sticky sessions<a class="headerlink" href="#sticky-sessions" title="Permanent link">&para;</a></h1>
<p>This example demonstrates how to achieve session affinity using cookies</p> <p>This example demonstrates how to achieve session affinity using cookies.</p>
<h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">&para;</a></h2> <h2 id="deployment">Deployment<a class="headerlink" href="#deployment" title="Permanent link">&para;</a></h2>
<p>Session stickiness is achieved through 3 annotations on the Ingress, as shown in the <a href="ingress.yaml">example</a>.</p> <p>Session affinity can be configured using the following annotations:</p>
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Description</th> <th>Description</th>
<th>Values</th> <th>Value</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>nginx.ingress.kubernetes.io/affinity</td> <td>nginx.ingress.kubernetes.io/affinity</td>
<td>Sets the affinity type</td> <td>Type of the affinity, set this to <code class="codehilite">cookie</code> to enable session affinity</td>
<td>string (in NGINX only <code class="codehilite">cookie</code> is possible</td> <td>string (NGINX only supports <code class="codehilite">cookie</code>)</td>
</tr> </tr>
<tr> <tr>
<td>nginx.ingress.kubernetes.io/session-cookie-name</td> <td>nginx.ingress.kubernetes.io/session-cookie-name</td>
<td>Name of the cookie that will be used</td> <td>Name of the cookie that will be created</td>
<td>string (default to INGRESSCOOKIE)</td> <td>string (defaults to <code class="codehilite">INGRESSCOOKIE</code>)</td>
</tr> </tr>
<tr> <tr>
<td>nginx.ingress.kubernetes.io/session-cookie-expires</td> <td>nginx.ingress.kubernetes.io/session-cookie-path</td>
<td>The value is a date as UNIX timestamp that the cookie will expire on, it corresponds to cookie Expires directive</td> <td>Path that will be set on the cookie (required if your <a href="../../../user-guide/ingress-path-matching">Ingress paths</a> use regular expressions)</td>
<td>number of seconds</td> <td>string (defaults to the currently <a href="../../../user-guide/ingress-path-matching">matched path</a>)</td>
</tr> </tr>
<tr> <tr>
<td>nginx.ingress.kubernetes.io/session-cookie-max-age</td> <td>nginx.ingress.kubernetes.io/session-cookie-max-age</td>
<td>Number of seconds until the cookie expires that will correspond to cookie <code class="codehilite">Max-Age</code> directive</td> <td>Time until the cookie expires, corresponds to the <code class="codehilite">Max-Age</code> cookie directive</td>
<td>number of seconds</td>
</tr>
<tr>
<td>nginx.ingress.kubernetes.io/session-cookie-expires</td>
<td>Legacy version of the previous annotation for compatibility with older browsers, generates an <code class="codehilite">Expires</code> cookie directive by adding the seconds to the current date</td>
<td>number of seconds</td> <td>number of seconds</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>You can create the ingress to test this</p> <p>You can create the <a href="ingress.yaml">example Ingress</a> to test this:</p>
<div class="codehilite"><pre><span></span><span class="go">kubectl create -f ingress.yaml</span> <div class="codehilite"><pre><span></span><span class="go">kubectl create -f ingress.yaml</span>
</pre></div> </pre></div>
<h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link">&para;</a></h2> <h2 id="validation">Validation<a class="headerlink" href="#validation" title="Permanent link">&para;</a></h2>
<p>You can confirm that the Ingress works.</p> <p>You can confirm that the Ingress works:</p>
<p><div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test <div class="codehilite"><pre><span></span><span class="gp">$</span> kubectl describe ing nginx-test
<span class="go">Name: nginx-test</span> <span class="go">Name: nginx-test</span>
<span class="go">Namespace: default</span> <span class="go">Namespace: default</span>
<span class="go">Address: </span> <span class="go">Address: </span>
@ -1246,13 +1251,14 @@
<span class="go">ETag: &quot;58875e6b-264&quot;</span> <span class="go">ETag: &quot;58875e6b-264&quot;</span>
<span class="go">Accept-Ranges: bytes</span> <span class="go">Accept-Ranges: bytes</span>
</pre></div> </pre></div>
In the example above, you can see a line containing the 'Set-Cookie: INGRESSCOOKIE' setting the right defined stickiness cookie.
This cookie is created by NGINX, it contains the hash of the used upstream in that request and has an expires. <p>In the example above, you can see that the response contains a <code class="codehilite">Set-Cookie</code> header with the settings we have defined.
If the user changes this cookie, NGINX creates a new one and redirect the user to another upstream.</p> This cookie is created by NGINX, it contains a randomly generated key corresponding to the upstream used for that request (selected using <a href="https://en.wikipedia.org/wiki/Consistent_hashing">consistent hashing</a>) and has an <code class="codehilite">Expires</code> directive.
<p>If the backend pool grows up NGINX will keep sending the requests through the same server of the first request, even if it's overloaded.</p> If the user changes this cookie, NGINX creates a new one and redirects the user to another upstream.</p>
<p>When the backend server is removed, the requests are then re-routed to another upstream server and NGINX creates a new cookie, as the previous hash became invalid.</p> <p>If the backend pool grows NGINX will keep sending the requests through the same server of the first request, even if it's overloaded.</p>
<p>When you have more than one Ingress Object pointing to the same Service, but one containing affinity configuration and other don't, the first created Ingress will be used. <p>When the backend server is removed, the requests are re-routed to another upstream server. This does not require the cookie to be updated because the key's <a href="https://en.wikipedia.org/wiki/Consistent_hashing">consistent hash</a> will change.</p>
This means that you can face the situation that you've configured Session Affinity in one Ingress and it doesn't reflects in NGINX configuration, because there is another Ingress Object pointing to the same service that doesn't configure this.</p> <p>When you have a Service pointing to more than one Ingress, with only one containing affinity configuration, the first created Ingress will be used.
This means that you can face the situation that you've configured session affinity on one Ingress and it doesn't work because the Service is pointing to another Ingress that doesn't configure this.</p>

View file

@ -15,9 +15,8 @@ spec:
targetPort: 8080 targetPort: 8080
name: http name: http
--- ---
apiVersion: apps/v1beta2 apiVersion: apps/v1
kind: Deployment kind: Deployment
apiVersion: apps/v1beta2
metadata: metadata:
name: nginx-errors name: nginx-errors
labels: labels:

File diff suppressed because one or more lines are too long

View file

@ -2,232 +2,232 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
<url> <url>
<loc>None</loc> <loc>None</loc>
<lastmod>2019-03-18</lastmod> <lastmod>2019-03-28</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
</url> </url>
</urlset> </urlset>

Binary file not shown.

View file

@ -1152,6 +1152,10 @@ that it passes several HTTP headers down to its <code class="codehilite">default
<td><code class="codehilite">X-Service-Port</code></td> <td><code class="codehilite">X-Service-Port</code></td>
<td>Port number of the Service backing the backend</td> <td>Port number of the Service backing the backend</td>
</tr> </tr>
<tr>
<td><code class="codehilite">X-Request-ID</code></td>
<td>Unique ID that identifies the request - same as for backend service</td>
</tr>
</tbody> </tbody>
</table> </table>
<p>A custom error backend can use this information to return the best possible representation of an error page. For <p>A custom error backend can use this information to return the best possible representation of an error page. For