mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 22:28:48 +00:00
Documentation: Adds sticky cookie note for k8s multiple replica setups (#3120)
This commit is contained in:
parent
fa1d343f2a
commit
358633638f
1 changed files with 30 additions and 0 deletions
|
@ -361,3 +361,33 @@ spec:
|
||||||
port:
|
port:
|
||||||
number: 3000
|
number: 3000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Multiple Replicas
|
||||||
|
|
||||||
|
If you plan to deploy homepage with a replica count greater than 1, you may
|
||||||
|
want to consider enabling sticky sessions on the homepage route. This will
|
||||||
|
prevent unnecessary re-renders on page loads and window / tab focusing. The
|
||||||
|
procedure for enabling sticky sessions depends on your Ingress controller. Below
|
||||||
|
is an example using Traefik as the Ingress controller.
|
||||||
|
|
||||||
|
```
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: homepage.example.com
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- kind: Rule
|
||||||
|
match: Host(`homepage.example.com`)
|
||||||
|
services:
|
||||||
|
- kind: Service
|
||||||
|
name: homepage
|
||||||
|
port: 3000
|
||||||
|
sticky:
|
||||||
|
cookie:
|
||||||
|
httpOnly: true
|
||||||
|
secure: true
|
||||||
|
sameSite: none
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue