Coder workspaces and the dashboard platform
Insights Platform
Sign in with Keycloak, get a VS Code and Jupyter workspace, publish a Streamlit, Gradio, Dash, Panel or FastAPI app to its own hostname.
Last verified 2026-11-19
- Workspace on demand · 8h autostop
- Profile 2–8 CPU · 2–8 GiB limits
- Frameworks 5 + custom
- Kube credentials none, either direction
- Dashboard hosts one login
- Namespaces 4
The path, as a diagram
Two lenses: the journey, and the platform it runs on.
01 · Orientation
Two surfaces, one identity
One login for the workspace and the dashboard board.
Coder creates and runs workspaces. dash.revierie.com lists dashboards, deploys, grants and logs. Two applications and two OIDC clients, one Keycloak realm and one groups claim.
| Surface | Hostname | What it is | How you enter |
|---|---|---|---|
| Workspace | coder.revierie.com | Creates and runs the VS Code + Jupyter pod | OIDC client coder |
| Workspace apps | 8080--main--<workspace>--<user>.coder.revierie.com | code-server on :8080, JupyterLab on :8888 | The Coder session; path apps are off |
| Dashboard home | dash.revierie.com | Cards, deploy, grants, logs | oauth2-proxy (client dash) |
| A dashboard | <slug>.dash.revierie.com | One app, one hostname | oauth2-proxy, then /authz/<slug> |
One session covers every dashboard
oauth2-proxy sets --cookie-domain=dash.revierie.com, so one sign-in covers the home page and every subdomain. Coder keeps a separate session on the coder host.
02 · Provision
1 · Spin up a workspace
One template, three parameters, about a minute.
- 01
Sign in at coder.revierie.com
Coder redirects to Keycloak (realm
homelab, clientcoder). There is no local account. Groups come from the token claim. - 02
Create a workspace
Choose the
Revierie DS Workspacetemplate. CI pushes it; the image is pinned by digest. - 03
Choose the shape
CPU 2–8 cores, memory 2–8 GiB, home disk 10–50 GiB. CPU and memory are mutable; the disk is fixed.
- 04
The provisioner builds it
A pod and Longhorn PVC appear in
coder-workspaces. The pod runs as uid 1000 withautomountServiceAccountToken: falseand pulls the image through the Kyverno-cloned Harbor secret. Anti-affinity spreads workspaces across nodes when possible. - 05
Open an app
The image includes VS Code (code-server 4.145.2, :8080), JupyterLab (:8888), the data-science stack and 15 extensions, including Revierie Dashboards.
- 06
Stop, or wait
Workspaces autostop after 8 hours idle and stop on disconnect. The pod is disposable; the PVC survives.
| Setting | Value | Note |
|---|---|---|
| Image | ds-workspace:<sha> from Harbor | Pinned by the template; nightly rebuild with a Trivy CRITICAL gate |
| Runtime | Python 3.12 · code-server 4.145.2 · JupyterLab | numpy, pandas, polars, matplotlib, seaborn, plotly, scikit-learn, openpyxl, duckdb |
| CPU / memory | 2–8 cores / 2–8 GiB (limits) | Mutable; requests are 250m / 512Mi |
| Home disk | 10–50 GiB (Longhorn) | Fixed after create; survives stops |
| Autostop | 8 hours idle | Also stopped on disconnect |
| Namespace quota | 8 CPU / 16 GiB requests, 100 Gi storage | Shared by all workspaces |
The workspace has no cluster credentials
The pod mounts no ServiceAccount token and has no kubeconfig. kubectl and helm are on the image, but they cannot reach this cluster. The extension uses your Keycloak token, not a cluster credential.
03 · Author
2 · Build a dashboard
Any Python process that serves HTTP. Five frameworks are preinstalled.
A dashboard is a project directory: an entry file, a port, optional requirements.txt pins and a .deployignore. Run it in the workspace (streamlit run app.py, uvicorn app:api). Nothing reaches the cluster until you publish.
- streamlit:
streamlit run <entry> - gradio:
python <entry> - dash:
python <entry> - panel:
panel serve <entry> - uvicorn:
uvicorn <module>:<app> - custom: whatever command the deployment should run
requirements.txt is pip-installed into /app/libs on every pod boot. That is slow for heavy dependencies and repeats on restart. Bake heavy dependencies into the runtime image.
Uploads are filtered
The extension tars the project minus the patterns in .deployignore and defaults such as .git/, virtualenvs, node_modules/ and large data files. Each publish stores a new version with its sha256; the Deployment records the version it runs.
04 · Publish
3 · Publish it
The extension signs in as you. The catalog writes the objects.
- 01
Sign in to the extension
The extension runs the OAuth 2.0 device flow against the public client
revierie-dash-extension. Open the link and confirm the code. Tokens go to VS Code SecretStorage and refresh on 401. - 02
Describe the dashboard
App type, entry file, port, slug, title and access. The slug matches
^[a-z0-9][a-z0-9-]{2,19}$and must be unique. The wizard savesds-deploy.json. - 03
Bundle and upload
POST /api/dashboards/<slug>/bundlesends the tar.gz with your Bearer JWT. The catalog stores the version and its sha256. - 04
The catalog generates objects
In
data-dashboards: a Deployment (Recreate, 1 replica), a Service, two forwardAuth middlewares and an IngressRoute for<slug>.dash.revierie.com. - 05
The pod fetches its code
An init container downloads the bundle from a one-hour HMAC URL, untars it and installs requirements if present. The main container runs the pinned runtime image.
- 06
Wait for the rollout
The catalog waits three minutes for a ready pod.
Recreatestops the old pod first, so a failed rollout leaves the dashboard down asdeploy-failed. - 07
Open it
The dashboard is at
https://<slug>.dash.revierie.comand on the home page. The.dashcookie covers the login.
{
"appType": "streamlit",
"entry": "app.py",
"port": 8501,
"slug": "churn-monitor",
"title": "Churn monitor",
"description": "Weekly cohort churn, refreshed from the warehouse.",
"access": "group:dashboard-viewers"
}
| Object | Name | Purpose |
|---|---|---|
| Deployment | dash-<slug> | 1 replica · Recreate · uid 1000 · no SA token · 100m/256Mi requests, 1 CPU/1 Gi limits |
| Service | dash-<slug> | ClusterIP on the declared port |
| Middleware | dash-oauth2-<slug> | forwardAuth to oauth2-proxy; identity headers on |
| Middleware | dash-authz-<slug> | forwardAuth to /authz/<slug> |
| IngressRoute | dash-<slug> | Host rule, wildcard TLS and the middleware chain |
No kubectl in the extension
The extension holds only your Keycloak token. The catalog's dashboard-deployer ServiceAccount writes to data-dashboards: Deployments, Services, traefik.io Middlewares and IngressRoutes, and pod logs. It has no ClusterRoles and cannot read Secrets.
05 · Authorize
4 · Decide who can see it
Dashboards start private. Grants add users, groups or public access; every request is checked.
Grants are rows in the catalog's Postgres. An owner can share with a user, a Keycloak group, or every signed-in user. The home page filters cards by the same rule.
| Grantee | What it allows | Where it is stored |
|---|---|---|
| Owner | Redeploy, stop, delete, edit details and grants | owner_email on the dashboard row |
| User | Open the dashboard | Grant row, grantee_type: user |
| Keycloak group | Open it as any group member | Grant row, grantee_type: group, e.g. dashboard-viewers |
| Public | Open it after sign-in | is_public on the grant row |
Traefik asks oauth2-proxy for a session. The proxy's headers carry the identity. Traefik then calls /authz/<slug>, which returns 202 for the owner or a grantee, 403 without a grant, and 404 for an unknown slug. The dashboard process has no auth code.
Anonymous traffic fails closed
The home page redirects to Keycloak. A dashboard subdomain returns 401; sign in at the home page first. Traefik cannot reference cross-namespace services in error middlewares, so the redirect lives on the base host.
Groups come from the Keycloak token, not from the cluster. Group changes apply at the next sign-in. Grant changes apply on the next request.
06 · Security
Security model
Identity, authorization, admission, isolation and supply chain are checked separately.
| Layer | Control | Enforced by |
|---|---|---|
| Identity | Keycloak OIDC, realm homelab. No local passwords. Separate clients for Coder, oauth2-proxy and the extension. | Keycloak |
| Browser auth | oauth2-proxy forwardAuth. HttpOnly cookie on dash.revierie.com. Identity headers only from a real login. | data-platform |
| API auth | Keycloak JWT checked against the realm JWKS: signature, issuer, azp/audience, groups. | catalog API |
| Authorization | Owner, user, group and public grants, checked per request by /authz/<slug>. | catalog API |
| Workload identity | No SA token in workspace or dashboard pods. The deployer SA is scoped to data-dashboards. No ClusterRoles. | templates + RBAC |
| Admission | Kyverno ds-platform-guardrails (Enforce): uid 1000, no SA token, harbor.revierie.com/revierie/ds-* images. Workspace pods run ds-workspace only. | Kyverno |
| Isolation | Baseline Pod Security. Quota 8 CPU / 16 GiB and 100 Gi storage. LimitRange 4 CPU / 8 Gi. No NodePorts or LoadBalancers. | namespaces |
| Network | Ingress-only NetworkPolicies: Traefik to catalog, oauth2-proxy and dashboards; Prometheus to metrics. | data-platform, data-dashboards |
| Supply chain | Private Harbor images, Trivy CRITICAL gate, digest and SHA pins, pull-secret cloning. | CI + Harbor + Kyverno |
| Secrets | SealedSecrets in Git. HMAC bundle tokens, one-hour TTL. The deployer Role cannot read Secrets. | Git + catalog |
| Audit | [AUDIT] lines for create, deploy, stop, start, restart and grant changes, with the acting user. | catalog API → Loki |
Kyverno does not know who applied an object. A generated pod and a kubectl apply face the same rules.
NetworkPolicies are ingress-only
kube-router with flannel refuses cross-node overlay traffic from any pod with an egress policy, whatever the rules allow. Probes against the API VIP and pod IPs confirmed it. Ingress is enforced; egress drafts stay in Git for a CNI that supports them.
A workspace cannot escalate through the platform. It has no token. The extension has no cluster client. Bundles arrive through a URL minted per deploy. The image allowlist rejects anything not built from this repository.
07 · Operations
Running it
Git declares the control plane. Workspaces and dashboards are runtime state.
Argo CD declares coder and data-platform from SHA-pinned Harbor images. Coder and the catalog create workspaces and dashboards at runtime; Kyverno checks them.
- Deploy / Update: bundle the project and roll a version
- Open: the home page or the dashboard host
- Status: version, replica readiness, catalog status
- Logs: the last minutes of the pod
- Stop / Start / Restart: lifecycle without a new bundle
- Delete: the generated objects and catalog rows
- Manage Access: opens the grants editor
| Alert | Means |
|---|---|
DSDashboardDeployFailed | Rollout did not become ready. Read the card logs. |
DSDashboardUnhealthy | Pod is crashlooping or not ready. |
DSAuthzForbiddenSpike | Signed-in users are refused. Check grants and the groups claim. |
DSCatalogApiMetricsDown | Prometheus cannot scrape the catalog. Deploys still run. |
DSWorkspaceQuotaPressure | coder-workspaces above 80% of 8 CPU / 16 GiB requests. |
CoderdMetricsDown | Coder metrics are not scraped. |
| Failure | Behaviour |
|---|---|
| Bad bundle upload | Rollout times out, status becomes deploy-failed, host stays down until a good bundle deploys. |
| Catalog API down | Dashboards fail closed: /authz gets no answer. |
| Bundle volume full | Longhorn expands the volume; an alert fires first. |
| Keycloak down | All SSO fails closed, including Coder. |
| Workspace pod lost | The PVC survives; Coder rebuilds the pod. |
Longhorn keeps hourly snapshots of workspace homes and a daily R2 backup of catalog-postgres, the bundle volume and coder-postgres. Dashboard pods hold no data; the bundle is the artifact.
08 · Limits
Not in v1
Current boundaries.
- No per-dashboard images. Dashboards run from a bundle at boot. Heavy dependencies belong in the runtime image.
- No egress NetworkPolicies. See the CNI limitation above.
- No GPU workspaces. A GPU profile is roadmap.
- No per-dashboard TLS or namespace. One wildcard certificate and one
data-dashboardsnamespace. - No autoscaling or blue-green. One
Recreatereplica: the host is down for a few seconds. - No automated secret rotation. The bundle HMAC and Keycloak client secrets are resealed by hand.
- No group sync into the cluster. Group changes apply at the next sign-in.
Per-app images, GPU profiles, egress policies and per-dashboard TLS are next. The cluster map and factory cover the rest of the platform.