diff --git a/charts/keeptrack/Chart.yaml b/charts/keeptrack/Chart.yaml index 908529b..819c59c 100644 --- a/charts/keeptrack/Chart.yaml +++ b/charts/keeptrack/Chart.yaml @@ -2,8 +2,8 @@ name: keeptrack description: Helm chart for Keeptrack type: application -version: 0.2.1 -appVersion: "2.0" +version: 0.2.2 +appVersion: "2.1" home: https://github.com/devpro/keeptrack sources: - https://github.com/devpro/keeptrack diff --git a/charts/keeptrack/README.md b/charts/keeptrack/README.md index 98655dc..e07dd05 100644 --- a/charts/keeptrack/README.md +++ b/charts/keeptrack/README.md @@ -44,6 +44,33 @@ Notable ones: for platforms that mandate the Kubernetes Pod Security Standards "restricted" profile. Disabled by default; validate in a non-production environment first. +## Scaling & high availability + +Both deployments support `replicaCount > 1`, by design of the app itself rather than of any particular ingress (no sticky sessions / cookie affinity required anywhere - +it works identically behind a Cloudflare tunnel, Traefik, ingress-nginx, or a plain `Service`). + +**`webapi`** (requires app image >= the release that introduced the MongoDB-backed job store): fully stateless per request. +Background-job progress (TV Time import, reference-data "sync now") is stored in MongoDB so any replica can answer a poll, +and the daily reference-data sync elects a single runner through a MongoDB lease, so scaling out never multiplies TMDB/RAWG/Discogs traffic. + +Just raise `webapi.replicaCount`. + +**`blazorapp`** (Blazor Server): two settings make multiple replicas work, both on by the time you scale: + +1. `blazorapp.dataProtection.enabled: true` (plus its MongoDB connection, typically the same secret as `webapi.db`) - shares the cookie-encryption key ring across replicas. + Without it, a login cookie issued by one pod is unreadable by the others and users bounce between logged-in and logged-out. + Worth enabling even at 1 replica: sessions then survive pod restarts. +2. `blazorapp.webSocketsOnly: true` (the default) - + 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. + Whatever sits in front only has to pass WebSockets through (Cloudflare tunnels and every mainstream ingress do). + +Known limitation (inherent to Blazor Server, not fixable by this chart): a circuit lives in the memory of exactly one pod. +When that pod dies or is replaced during a rollout, browsers connected to it reconnect and reload the page they were on +(no user data is lost - the app saves edits as they are made). +Extra replicas therefore add capacity and availability for new connections; they don't make an individual session survive the loss of its pod. +After a transient network blip (pod still alive), the client's reconnect attempts re-roll across replicas until one lands on the right pod, +which at small replica counts succeeds within the default retry budget. + ## Development Look at the [Contributing guide](CONTRIBUTING.md). diff --git a/charts/keeptrack/templates/deployment.yaml b/charts/keeptrack/templates/deployment.yaml index a528cca..a016cd9 100644 --- a/charts/keeptrack/templates/deployment.yaml +++ b/charts/keeptrack/templates/deployment.yaml @@ -95,7 +95,7 @@ spec: value: {{ $.Values.dotnet.logLevels.default | quote }} - name: Logging__LogLevel__Microsoft.AspNetCore value: {{ $.Values.dotnet.logLevels.framework | quote }} - - name: Logging__LogLevel__Devpro + - name: Logging__LogLevel__Keeptrack value: {{ $.Values.dotnet.logLevels.application | quote }} - name: Features__IsHttpsRedirectionEnabled value: {{ $.Values.dotnet.httpsRedirectionEnabled | quote }} @@ -104,6 +104,22 @@ spec: {{- if eq .role "frontend" }} - name: WebApi__BaseUrl value: "http://{{ $.Values.webapi.name }}" + - name: Features__IsWebSocketsOnlyEnabled + value: {{ .webSocketsOnly | quote }} + {{- if .dataProtection.enabled }} + {{- if .dataProtection.connectionStringSecretKeyRef }} + - name: DataProtection__MongoDb__ConnectionString + valueFrom: + secretKeyRef: + name: {{ .dataProtection.connectionStringSecretKeyRef.name }} + key: {{ .dataProtection.connectionStringSecretKeyRef.key }} + {{- else }} + - name: DataProtection__MongoDb__ConnectionString + value: {{ .dataProtection.connectionString | quote }} + {{- end }} + - name: DataProtection__MongoDb__DatabaseName + value: {{ .dataProtection.databaseName | quote }} + {{- end }} {{- if $.Values.firebase.webApp.apiKeySecretKeyRef }} - name: Firebase__WebAppConfiguration__ApiKey valueFrom: @@ -193,6 +209,8 @@ spec: value: {{ .db.databaseName | quote }} - name: Features__IsReferenceSyncEnabled value: {{ .referenceData.isSyncEnabled | quote }} + - name: Features__FreeTierItemLimit + value: {{ .freeTierItemLimit | quote }} {{- if .referenceData.bookProvider }} - name: ReferenceData__BookProvider value: {{ .referenceData.bookProvider | quote }} diff --git a/charts/keeptrack/values.yaml b/charts/keeptrack/values.yaml index 3b7083e..ad9f792 100644 --- a/charts/keeptrack/values.yaml +++ b/charts/keeptrack/values.yaml @@ -8,7 +8,7 @@ healthEndpoint: /health tls: secretName: keeptrack-blazorapp-tls - tag: 2.0.29367732118 # ref. https://hub.docker.com/r/devprofr/keeptrack-blazorapp/tags + tag: 2.1.29541631973 # ref. https://hub.docker.com/r/devprofr/keeptrack-blazorapp/tags replicaCount: 1 resources: {} # limits: @@ -22,6 +22,25 @@ # value: "yyyy" additionalPodLabels: {} host: "" + # Blazor Server scale-out support - see README "Scaling & high availability". + # Persists the app's Data Protection key ring (which encrypts the auth cookie and antiforgery tokens) + # in MongoDB, so every replica can decrypt what any other replica issued. REQUIRED before setting replicaCount > 1; + # recommended even at 1 replica (sessions then survive pod restarts). + dataProtection: + enabled: false + # important when enabled: connectionString or connectionStringSecretKeyRef must be provided + # (typically the same secret as webapi.db) + # connectionStringSecretKeyRef: + # name: "" + # key: "" + # connectionString: "" + databaseName: "keeptrack" + # Forces the Blazor Server circuit onto a single WebSocket with no negotiate round-trip, so a circuit + # naturally sticks to the replica that owns its state - + # no load-balancer cookie affinity needed, which makes replicaCount > 1 work behind anything that passes WebSockets through (cloudflared, Traefik, plain Services). + # Only set to false if a proxy in front can't pass WebSockets; + # such a deployment must then stay at replicaCount 1. + webSocketsOnly: true webapi: enabled: true @@ -35,10 +54,14 @@ webapi: secretName: keeptrack-webapi-tls host: "" replicaCount: 1 - tag: 2.0.29367732118 # ref. https://hub.docker.com/r/devprofr/keeptrack-webapi/tags + tag: 2.1.29541631973 # ref. https://hub.docker.com/r/devprofr/keeptrack-webapi/tags resources: {} extraEnv: [] additionalPodLabels: {} + # how many items a signed-in account WITHOUT the Firebase "member"/"admin" role may create per free-tier collection (movies, TV shows); + # such accounts have no access to the other collections at all - + # grant `role: member` via the Firebase Admin SDK to unlock everything (see the app's CONTRIBUTING.md) + freeTierItemLimit: 20 db: # important: connectionString or connectionStringSecretKeyRef must be provided # connectionStringSecretKeyRef: @@ -46,9 +69,8 @@ webapi: # key: "" # connectionString: "someconnstring" databaseName: "keeptrack" - # optional: third-party providers used to enrich movies/TV shows/video games/books/albums with - # posters, synopsis, cast and episode data. Leaving a key empty just means that provider's - # enrichment silently fails (401/403 from the provider) - the rest of the app is unaffected. + # optional: third-party providers used to enrich movies/TV shows/video games/books/albums with posters, synopsis, cast and episode data. + # Leaving a key empty just means that provider's enrichment silently fails (401/403 from the provider) - the rest of the app is unaffected. referenceData: # overrides the app's own default ("OpenLibrary") - see WebApi's AppConfiguration.BookReferenceProvider bookProvider: "" diff --git a/charts/sidelab/.helmignore b/charts/sidelab/.helmignore index d359a7a..d13bc8e 100644 --- a/charts/sidelab/.helmignore +++ b/charts/sidelab/.helmignore @@ -1,8 +1,10 @@ -# Patterns to ignore when building packages. -.DS_Store +.DS_Store .git/ .gitignore .helmignore *.orig *.swp *.bak +values.mine.yaml +temp*.yaml +kubeconfig diff --git a/charts/sidelab/Chart.yaml b/charts/sidelab/Chart.yaml index cd30a2d..b36908d 100644 --- a/charts/sidelab/Chart.yaml +++ b/charts/sidelab/Chart.yaml @@ -4,7 +4,7 @@ description: > Self-hosted interactive lab platform. Deploys the Sidelab launcher, which manages lab sessions as ephemeral Kubernetes Pods inside tenant-scoped namespaces. type: application -version: 0.1.1 +version: 0.1.2 appVersion: "0.1.0" keywords: - sidelab diff --git a/charts/sidelab/README.md b/charts/sidelab/README.md index c9681d5..015eed1 100644 --- a/charts/sidelab/README.md +++ b/charts/sidelab/README.md @@ -3,7 +3,8 @@ Helm chart for [Sidelab](https://github.com/devpro-training/sidelab) — a self-hosted interactive lab platform. Deploys the Sidelab launcher, which manages lab sessions as ephemeral Kubernetes Pods inside tenant-scoped namespaces. -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. +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. `values.yaml` is the source of truth for every option — it's fully commented, including Traefik/cert-manager/Let's Encrypt examples. ## Quick Start @@ -23,7 +24,8 @@ Install the application: helm upgrade --install sidelab devpro/sidelab -f values.yaml --namespace sidelab --create-namespace ``` -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. +One value is always required: `image.repository` — the chart is public but the sidelab images are not published to a public registry. +Everything else has working defaults: SQLite + NodePort + auto-generated secrets, no external dependencies. 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). ## Uninstall @@ -33,7 +35,8 @@ helm uninstall sidelab -n sidelab kubectl delete namespace sidelab ``` -The auto-generated `-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. +The auto-generated `-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. ## Going further diff --git a/charts/sidelab/ci/ci-values.yaml b/charts/sidelab/ci/ci-values.yaml new file mode 100644 index 0000000..4ffe840 --- /dev/null +++ b/charts/sidelab/ci/ci-values.yaml @@ -0,0 +1,2 @@ +image: + repository: ci-dummy-registry/app diff --git a/charts/sidelab/templates/NOTES.txt b/charts/sidelab/templates/NOTES.txt index 04693b9..64651c3 100644 --- a/charts/sidelab/templates/NOTES.txt +++ b/charts/sidelab/templates/NOTES.txt @@ -25,12 +25,14 @@ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ First login ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - Username: {{ .Values.auth.adminUsername }} {{- if .Values.auth.existingSecret }} + Username: (value of the "ADMIN_USERNAME" key in Secret/{{ .Values.auth.existingSecret }}) Password: (value of the "ADMIN_PASSWORD" key in Secret/{{ .Values.auth.existingSecret }}) {{- else if .Values.auth.adminPassword }} + Username: {{ .Values.auth.adminUsername }} Password: (value of auth.adminPassword you supplied) {{- else }} + Username: {{ .Values.auth.adminUsername }} Password: auto-generated on first install — retrieve it with: kubectl get secret -n {{ .Release.Namespace }} {{ include "sidelab.authSecretName" . }} \ diff --git a/charts/sidelab/templates/_helpers.tpl b/charts/sidelab/templates/_helpers.tpl index 8845906..e2f8e6d 100644 --- a/charts/sidelab/templates/_helpers.tpl +++ b/charts/sidelab/templates/_helpers.tpl @@ -1,4 +1,4 @@ -{{/* +{{/* Expand the name of the chart. */}} {{- define "sidelab.name" -}} @@ -101,8 +101,8 @@ Image tag — falls back to .Chart.AppVersion. {{- end }} {{/* -Dashboard hostname. ingress.host wins; otherwise derived from the shared -top-level `domain` value as "sidelab.". Empty if neither is set. +Dashboard hostname. ingress.host wins; otherwise derived from the shared top-level `domain` value as "sidelab.". +Empty if neither is set. */}} {{- define "sidelab.ingressHost" -}} {{- if .Values.ingress.host -}} @@ -113,8 +113,8 @@ top-level `domain` value as "sidelab.". Empty if neither is set. {{- end }} {{/* -Lab session wildcard domain. launcher.labDomain wins; otherwise derived from -the shared top-level `domain` value as "labs.". Empty if neither is set. +Lab session wildcard domain. launcher.labDomain wins; otherwise derived from the shared top-level `domain` value as "labs.". +Empty if neither is set. */}} {{- define "sidelab.labDomain" -}} {{- if .Values.launcher.labDomain -}} @@ -125,11 +125,11 @@ the shared top-level `domain` value as "labs.". Empty if neither is set. {{- end }} {{/* -MongoDB connection string. database.mongo.url wins; otherwise, if the bundled -mongodb subchart is enabled, derived from its default standalone Service name -("-mongodb", per the alias in Chart.yaml and the Bitnami chart's -own naming convention) and mongodb.auth.rootPassword. Only called from -secret.yaml when database.mongo.existingSecret is not set. +MongoDB connection string. +database.mongo.url wins; +otherwise, if the bundled mongodb subchart is enabled, derived from its default standalone Service name +("-mongodb", per the alias in Chart.yaml and the Bitnami chart's own naming convention) and mongodb.auth.rootPassword. +Only called from secret.yaml when database.mongo.existingSecret is not set. */}} {{- define "sidelab.mongoUrl" -}} {{- if .Values.database.mongo.url -}} @@ -140,10 +140,9 @@ secret.yaml when database.mongo.existingSecret is not set. {{- end }} {{/* -JWT secret — auth.jwtSecret wins; otherwise reused from the existing Secret on -upgrade (via lookup), or freshly generated on first install. `lookup` returns -nothing outside a real cluster (e.g. `helm template`), so offline rendering -always generates a fresh value — expected, and harmless for a dry render. +JWT secret — auth.jwtSecret wins; otherwise reused from the existing Secret on upgrade (via lookup), or freshly generated on first install. +`lookup` returns nothing outside a real cluster (e.g. `helm template`), so offline rendering always generates a fresh value — +expected, and harmless for a dry render. Only called from secret.yaml when auth.existingSecret is not set. */}} {{- define "sidelab.jwtSecret" -}} @@ -180,6 +179,9 @@ Only called from secret.yaml when auth.existingSecret is not set. Validate required values and emit a clear error message. */}} {{- define "sidelab.validateValues" -}} +{{- if not .Values.image.repository }} +{{- fail "image.repository is required." }} +{{- end }} {{- if and (eq .Values.database.backend "mongo") (not .Values.database.mongo.url) (not .Values.database.mongo.existingSecret) (not .Values.mongodb.enabled) }} {{- fail "database.backend=mongo needs one of: database.mongo.url, database.mongo.existingSecret, or mongodb.enabled=true." }} {{- end }} diff --git a/charts/sidelab/templates/configmap.yaml b/charts/sidelab/templates/configmap.yaml index 57e16af..2daa943 100644 --- a/charts/sidelab/templates/configmap.yaml +++ b/charts/sidelab/templates/configmap.yaml @@ -27,9 +27,10 @@ data: K8S_INGRESS_TEMPLATE: "/app/config/ingress-template.yaml" {{- end }} K8S_NAMESPACE_PREFIX: {{ .Values.launcher.namespacePrefix | quote }} - {{- if .Values.launcher.knownNamespaces }} - K8S_KNOWN_NAMESPACES: {{ .Values.launcher.knownNamespaces | quote }} - {{- end }} + # Orphan cleanup and the restart delete-by-label fallback only scan the + # namespaces listed here — the app has no discovery of its own, so always set + # at least the seeded admin tenant's namespace. + K8S_KNOWN_NAMESPACES: {{ .Values.launcher.knownNamespaces | default (printf "%s-admin" .Values.launcher.namespacePrefix) | quote }} --- {{- if and (eq .Values.launcher.labAccess "ingress") (not .Values.launcher.ingressTemplateConfigMap) }} # Default Ingress template for lab session Pods, modeled on @@ -59,11 +60,16 @@ data: app: sidelab-lab sidelab.io/session: "{{"{{"}}SESSION_ID{{"}}"}}" sidelab.io/tenant: "{{"{{"}}TENANT{{"}}"}}" - {{- $issuer := index .Values.ingress.annotations "cert-manager.io/cluster-issuer" }} - {{- if $issuer }} annotations: + # Long-lived WebSockets (terminal, VNC) — ingress-nginx otherwise drops + # them after its 60s default proxy-read-timeout. Traefik ignores these. + nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" + nginx.ingress.kubernetes.io/proxy-http-version: "1.1" + {{- $issuer := index .Values.ingress.annotations "cert-manager.io/cluster-issuer" }} + {{- if $issuer }} cert-manager.io/cluster-issuer: {{ $issuer | quote }} - {{- end }} + {{- end }} spec: {{- if .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className | quote }} diff --git a/charts/sidelab/templates/networkpolicy.yaml b/charts/sidelab/templates/networkpolicy.yaml index c0a4d6d..c8ab492 100644 --- a/charts/sidelab/templates/networkpolicy.yaml +++ b/charts/sidelab/templates/networkpolicy.yaml @@ -32,6 +32,16 @@ spec: ports: - port: {{ .Values.service.port }} protocol: TCP + # Allow lab pods in tenant namespaces (sidelab-) — they call the + # launcher back for token validation on lab login and on session finish. + # The launcher labels every namespace it creates with this. + - from: + - namespaceSelector: + matchLabels: + app.kubernetes.io/managed-by: sidelab + ports: + - port: {{ .Values.service.port }} + protocol: TCP {{- range .Values.networkPolicy.additionalIngressNamespaces }} - from: - namespaceSelector: diff --git a/charts/sidelab/templates/rbac.yaml b/charts/sidelab/templates/rbac.yaml index 8fd3075..481d204 100644 --- a/charts/sidelab/templates/rbac.yaml +++ b/charts/sidelab/templates/rbac.yaml @@ -1,7 +1,6 @@ -{{- if .Values.rbac.create }} -# The launcher needs cluster-scoped permissions because it creates lab Pods in -# dynamically-named tenant namespaces (sidelab-). A namespaced Role -# would require pre-creating one per tenant namespace, which defeats the purpose. +{{- if .Values.rbac.create }} +# The launcher needs cluster-scoped permissions because it creates lab Pods in dynamically-named tenant namespaces (sidelab-). +# A namespaced Role would require pre-creating one per tenant namespace, which defeats the purpose. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -12,7 +11,7 @@ rules: # Namespace management — creates sidelab- on first lab start - apiGroups: [""] resources: ["namespaces"] - verbs: ["get", "list", "create"] + verbs: ["get", "create"] # Lab Pod lifecycle - apiGroups: [""] @@ -24,10 +23,11 @@ rules: resources: ["services"] verbs: ["get", "list", "create", "delete"] - # Per-session Secrets holding private git PATs — created and deleted per session + # Per-session Secrets holding private git PATs — created and deleted per session, never read back. + # No get/list here: on a ClusterRole that would mean read access to every Secret in the cluster. - apiGroups: [""] resources: ["secrets"] - verbs: ["get", "list", "create", "delete"] + verbs: ["create", "delete"] # Lab Ingress resources (when K8S_LAB_ACCESS=ingress) - apiGroups: ["networking.k8s.io"] diff --git a/charts/sidelab/values.yaml b/charts/sidelab/values.yaml index dddcb65..cdbdb7e 100644 --- a/charts/sidelab/values.yaml +++ b/charts/sidelab/values.yaml @@ -1,12 +1,14 @@ # ── Domain ──────────────────────────────────────────────────────────────────── -# Single source of truth for hostnames, so you don't repeat your domain in -# multiple places. Leave the two derived values below empty to use it: -# ingress.host defaults to "sidelab." (the dashboard) +# Single source of truth for hostnames, so you don't repeat your domain in multiple places. +# Leave the two derived values below empty to use it: +# ingress.host defaults to "sidelab." (the dashboard) # launcher.labDomain defaults to "labs." (lab sessions, wildcard) # Only used when left empty — set ingress.host / launcher.labDomain directly to override. domain: "" image: + # -- Required: the chart is public but the sidelab images are not published to a public registry. + # The chart fails fast at render time when unset. repository: pullPolicy: IfNotPresent # -- Defaults to .Chart.AppVersion when empty. @@ -18,30 +20,30 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" -# Session state (active sessions, port allocations, expiry timers) is kept -# in-memory by the launcher process — it is NOT shared across replicas and -# does NOT survive a restart. Keep this at 1 regardless of database backend; +# Session state (active sessions, port allocations, expiry timers) is kept in-memory by the launcher process — +# it is NOT shared across replicas and does NOT survive a restart. +# Keep this at 1 regardless of database backend; # this is a known upstream limitation, not a SQLite-specific one. replicaCount: 1 # ── Auth ────────────────────────────────────────────────────────────────────── auth: # -- JWT secret used to sign lab tokens and session cookies. - # Leave empty to auto-generate a strong random value on first install — it is - # then kept stable across upgrades (read back from the existing Secret). - # The app itself refuses to start in production with an unset/default secret, - # so this is not optional in practice — just easy to leave to the chart. + # Leave empty to auto-generate a strong random value on first install — it is then kept stable across upgrades (read back from the existing Secret). + # The app itself refuses to start in production with an unset/default secret, so this is not optional in practice — just easy to leave to the chart. jwtSecret: "" # Initial admin credentials — only used to seed the database when it's empty. adminUsername: "admin" - # -- Leave empty to auto-generate a strong random password on first install - # (kept stable across upgrades). Retrieve it with the command printed by - # `helm install`/`helm upgrade` (see NOTES.txt). + # -- Leave empty to auto-generate a strong random password on first install (kept stable across upgrades). + # Retrieve it with the command printed by `helm install`/`helm upgrade` (see NOTES.txt). adminPassword: "" # -- Use your own pre-created Secret instead of the two fields above. # Keys expected: JWT_SECRET, ADMIN_USERNAME, ADMIN_PASSWORD. + # GitOps note (ArgoCD/Flux): those tools render templates offline, where the auto-generate-then-reuse trick above can't look up the existing Secret — + # so every sync would rotate JWT_SECRET, logging everyone out and making stored repo tokens undecryptable. + # Under GitOps, always set this (or auth.jwtSecret). existingSecret: "" # ── Database ──────────────────────────────────────────────────────────────────── @@ -49,10 +51,8 @@ database: # -- Options: sqlite, mongo. # sqlite is the zero-dependency default — good for a quick look or a demo. # mongo is the recommended backend for anything you intend to keep around; - # point it at your own MongoDB (Atlas or self-hosted) via database.mongo.url, - # or flip on the bundled chart below for a disposable demo instance. - # There are no schema migrations on either backend (see the app's CLAUDE.md) — - # an in-place upgrade across a schema change needs a fresh database. + # point it at your own MongoDB (Atlas or self-hosted) via database.mongo.url, or flip on the bundled chart below for a disposable demo instance. + # There are no schema migrations on either backend (see the app's CLAUDE.md) — an in-place upgrade across a schema change needs a fresh database. backend: "sqlite" sqlite: @@ -149,8 +149,12 @@ launcher: # gets namespace "sidelab-admin" with the default prefix. namespacePrefix: "sidelab" - # -- Comma-separated list of namespaces to scan for orphan cleanup on startup. - # Leave empty — the launcher discovers them from the namespace prefix above. + # -- Comma-separated list of tenant namespaces the launcher scans for orphan + # cleanup on startup and for terminating sessions it lost track of across a + # restart (delete-by-label fallback). The app does NOT discover these itself — + # left empty, the chart defaults to "-admin" (the seeded + # admin tenant). List every tenant namespace here once you add tenants, + # e.g. "sidelab-admin,sidelab-acme". knownNamespaces: "" # Note: the git-clone init container used for git-sourced courses always runs @@ -254,6 +258,10 @@ podDisruptionBudget: minAvailable: 1 # ── Network Policies ───────────────────────────────────────────────────────────── +# Lab pods calling back into the launcher (token validation, session finish) are +# always allowed: the policy admits any namespace labeled +# app.kubernetes.io/managed-by=sidelab, which the launcher sets on every tenant +# namespace it creates. networkPolicy: enabled: false # -- Namespace the ingress controller runs in, allowed to reach the dashboard Service.