You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/keeptrack/README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,33 @@ Notable ones:
44
44
for platforms that mandate the Kubernetes Pod Security Standards "restricted" profile.
45
45
Disabled by default; validate in a non-production environment first.
46
46
47
+
## Scaling & high availability
48
+
49
+
Both deployments support `replicaCount > 1`, by design of the app itself rather than of any particular ingress (no sticky sessions / cookie affinity required anywhere -
50
+
it works identically behind a Cloudflare tunnel, Traefik, ingress-nginx, or a plain `Service`).
51
+
52
+
**`webapi`** (requires app image >= the release that introduced the MongoDB-backed job store): fully stateless per request.
53
+
Background-job progress (TV Time import, reference-data "sync now") is stored in MongoDB so any replica can answer a poll,
54
+
and the daily reference-data sync elects a single runner through a MongoDB lease, so scaling out never multiplies TMDB/RAWG/Discogs traffic.
55
+
56
+
Just raise `webapi.replicaCount`.
57
+
58
+
**`blazorapp`** (Blazor Server): two settings make multiple replicas work, both on by the time you scale:
59
+
60
+
1.`blazorapp.dataProtection.enabled: true` (plus its MongoDB connection, typically the same secret as `webapi.db`) - shares the cookie-encryption key ring across replicas.
61
+
Without it, a login cookie issued by one pod is unreadable by the others and users bounce between logged-in and logged-out.
62
+
Worth enabling even at 1 replica: sessions then survive pod restarts.
63
+
2.`blazorapp.webSocketsOnly: true` (the default) -
64
+
each Blazor circuit runs on one long-lived WebSocket and therefore naturally sticks to the pod that owns its in-memory state, with no load-balancer affinity needed.
65
+
Whatever sits in front only has to pass WebSockets through (Cloudflare tunnels and every mainstream ingress do).
66
+
67
+
Known limitation (inherent to Blazor Server, not fixable by this chart): a circuit lives in the memory of exactly one pod.
68
+
When that pod dies or is replaced during a rollout, browsers connected to it reconnect and reload the page they were on
69
+
(no user data is lost - the app saves edits as they are made).
70
+
Extra replicas therefore add capacity and availability for new connections; they don't make an individual session survive the loss of its pod.
71
+
After a transient network blip (pod still alive), the client's reconnect attempts re-roll across replicas until one lands on the right pod,
72
+
which at small replica counts succeeds within the default retry budget.
73
+
47
74
## Development
48
75
49
76
Look at the [Contributing guide](CONTRIBUTING.md).
# Blazor Server scale-out support - see README "Scaling & high availability".
26
+
# Persists the app's Data Protection key ring (which encrypts the auth cookie and antiforgery tokens)
27
+
# in MongoDB, so every replica can decrypt what any other replica issued. REQUIRED before setting replicaCount > 1;
28
+
# recommended even at 1 replica (sessions then survive pod restarts).
29
+
dataProtection:
30
+
enabled: false
31
+
# important when enabled: connectionString or connectionStringSecretKeyRef must be provided
32
+
# (typically the same secret as webapi.db)
33
+
# connectionStringSecretKeyRef:
34
+
# name: ""
35
+
# key: ""
36
+
# connectionString: ""
37
+
databaseName: "keeptrack"
38
+
# Forces the Blazor Server circuit onto a single WebSocket with no negotiate round-trip, so a circuit
39
+
# naturally sticks to the replica that owns its state -
40
+
# no load-balancer cookie affinity needed, which makes replicaCount > 1 work behind anything that passes WebSockets through (cloudflared, Traefik, plain Services).
41
+
# Only set to false if a proxy in front can't pass WebSockets;
42
+
# such a deployment must then stay at replicaCount 1.
Copy file name to clipboardExpand all lines: charts/sidelab/README.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
Helm chart for [Sidelab](https://github.com/devpro-training/sidelab) — a self-hosted interactive lab platform.
4
4
Deploys the Sidelab launcher, which manages lab sessions as ephemeral Kubernetes Pods inside tenant-scoped namespaces.
5
5
6
-
Supports SQLite (zero-dependency, quick look/demo) or MongoDB (recommended for anything you keep — external, or a bundled disposable instance for a demo) as the database backend, and NodePort or Ingress for exposing lab sessions.
6
+
Supports SQLite (zero-dependency, quick look/demo) or MongoDB (recommended for anything you keep — external, or a bundled disposable instance for a demo)
7
+
as the database backend, and NodePort or Ingress for exposing lab sessions.
7
8
`values.yaml` is the source of truth for every option — it's fully commented, including Traefik/cert-manager/Let's Encrypt examples.
Nothing above is strictly required — `helm upgrade --install sidelab devpro/sidelab --namespace sidelab --create-namespace` alone works too: SQLite + NodePort + auto-generated secrets, no external dependencies.
27
+
One value is always required: `image.repository` — the chart is public but the sidelab images are not published to a public registry.
28
+
Everything else has working defaults: SQLite + NodePort + auto-generated secrets, no external dependencies.
27
29
See [CONTRIBUTING.md](CONTRIBUTING.md) for ready-to-use `values.mine.yaml` snippets covering the other use cases (MongoDB, Ingress + cert-manager, the bundled MongoDB demo chart).
The auto-generated `<release>-auth` Secret (admin password) and the data PVC are deleted along with the namespace — back up `database.mongo.url`'s target or the PVC first if you need to keep the data.
38
+
The auto-generated `<release>-auth` Secret (admin password) and the data PVC are deleted along with the namespace —
39
+
back up `database.mongo.url`'s target or the PVC first if you need to keep the data.
0 commit comments