Vikunja — fleet todo backend¶
Vikunja is the cluster's self-hosted to-do / task-management app (single Go binary + Postgres, REST/OpenAPI). It is the system-of-record for the agent fleet's task backlog: each automation keeps its own labelled slice and Robert gets one aggregated, checkable view.
Where it lives¶
kubernetes/apps/collab/vikunja/:
- Pod:
ghcr.io/go-vikunja/vikunja:2.8.0, port 3456, app-template HelmRelease,statefulset. - Internal hostname:
vikunja.${SECRET_DOMAIN}on the internal gateway only (no public exposure). There is no gateway extAuthSecurityPolicyin front of it — Vikunja is its own auth gate. This is deliberate: automations call the REST API with a Vikunja API token, and a forward-auth gate would reject token requests. - Auth: native OpenID Connect against Authelia (
VIKUNJA_AUTH_OPENID_*), with local + API-token auth kept on (VIKUNJA_AUTH_LOCAL_ENABLED=true). Robert logs in through the browser via Authelia; automations authenticate with an API token. - Database:
postgres-vikunja(CNPG, 3 replicas,ceph-blockPGData, weekly Barman backup to Garage —kubernetes/apps/databases/cloudnative-pg/config/vikunja/). Credentials come from CNPG's generatedpostgres-vikunja-appSecret, reflected intocollab(same emberstack-reflector pattern as Monica). - Files PVC:
vikunja-data-pvc(Longhorn, 2 replicas, weekly backup + daily snapshot) mounted at/files(VIKUNJA_FILES_BASEPATH). Holds uploaded attachments and avatars — irreplaceable, so Longhorn rather thanceph-block.
Secrets¶
1Password item vikunja (vault Kubernetes), rendered by the inline
externalSecrets block in the HelmRelease and by the shared cnpg-app-database
component:
| Field | Consumed as | Used by |
|---|---|---|
JWT_SECRET |
VIKUNJA_SERVICE_SECRET |
app — JWT/session signing |
OIDC_CLIENT_SECRET |
VIKUNJA_AUTH_OPENID_PROVIDERS_AUTHELIA_CLIENTSECRET |
app — OIDC client secret |
GARAGE_AWS_ACCESS_KEY_ID / GARAGE_AWS_SECRET_ACCESS_KEY |
S3 creds | CNPG Barman backup to Garage |
fleet_token |
API_KEY (→ Authorization: Bearer) |
vikunja-mcp bridge + the laptop _shared/vikunja.py curl helper — the one shared fleet user's API token |
base_url |
(laptop helper only; in-cluster bridge uses SERVER_URL_OVERRIDE instead) |
_shared/vikunja.py |
Database username/password are not in 1Password — they are generated by CNPG and
reflected from databases into collab.
Auth model¶
- Robert → browser → Authelia OIDC → full access (admin via Authelia group).
- Automations → REST API with a shared API token → each task carries a per-owner label + title prefix so one view can be grouped by owner.
The OIDC redirect URI Authelia must allow is derived from the public URL plus the
provider key: https://vikunja.${SECRET_DOMAIN}/auth/openid/authelia.
Authelia-side client registration¶
Unlike most of this app's config, the Authelia OIDC client registration for
vikunja (client_id, redirect URI, scopes, and the argon2id hash of
OIDC_CLIENT_SECRET) is not a Git-managed resource. It lives entirely in the
authelia 1Password item's OIDC_CLIENTS_YAML field, which
kubernetes/apps/auth/authelia/app/externalsecret.yaml renders verbatim to
/secrets/clients.yml and Authelia merges via --config. See that file's comments
for why (keeps every client's secret hash out of git by design, not by oversight)
and kubernetes/apps/auth/authelia/app/configmap.yaml's access_control comment
for why native-OIDC clients like this one aren't governed by that block — they
carry their own authorization_policy (admin_only, gating to Robert's
lldap_admin group, mirroring netbox and other admin-tier native-OIDC clients
in the same 1Password field).
Changing or rotating this client is a 1Password-item edit, not a PR — there is
nothing under kubernetes/apps/auth/authelia/ to update for a client add/change
alone. Bump the force-sync annotation timestamp on the authelia ExternalSecret
in the same operation so ESO refetches immediately instead of waiting out its 1h
refreshInterval.
MCP bridge (kagent tier)¶
kubernetes/apps/ai/vikunja-mcp/ is a ghcr.io/rwlove/mcp-openapi-proxy
(matthewhand, streamable-http) bridge, federated through the Kuadrant
mcp-gateway (kubernetes/apps/mcp-system/vikunja-mcp/, prefix vikunja_) and
scoped into the kagent-tier MCPVirtualServer. It gives the in-cluster kagent
fleet (currently: the radar morning-brief agent) read access to the "Fleet
Todos" project without reaching for the laptop's curl-based
_shared/vikunja.py helper.
- Read-only by construction — the bridge's hand-authored OpenAPI spec
(
app/resources/vikunja.json) declares GET-only paths:getProjects,getProject,getProjectTasks,getTask,getLabels. No create/update/ delete path is declared, so there is no tool that can mutate the fleet todo store through this path — mutation (add/done/update/delete) stays on the laptop helper under thefleetuser's full token scope. This mirrors the tactic used to trimtim-mcp's wardrowbe spec to a read subset. - Tools (federated name =
vikunja_+ the matthewhand<method>_<path>derivation):vikunja_get_v1_projects,vikunja_get_v1_projects_by_id,vikunja_get_v1_projects_by_id_tasks,vikunja_get_v1_tasks_by_id,vikunja_get_v1_labels. - Auth: the bridge injects
Authorization: Bearer <fleet_token>on every upstream request (API_KEYenv, matthewhand's default bearer behavior) — the samefleet_tokenfield the laptop helper reads, so both paths hit Vikunja as the one sharedfleetuser. - Network path:
mcp-gatewaypod (mcp-system) →vikunja-mcpService (ai, :8080) → Vikunja (collab, :3456). The Vikunja HelmRelease'snetworkpolicies.allow.ingresshas anai-namespace rule on :3456 for this (mirrorshomebox/grocy's ingress rule for their bridges). - Known gap (as of this bridge landing): the
radarkagentAgentCR (kubernetes/apps/ai/kagent/app/agent-radar.yaml) does not yet list these tools in itstools[]— wiring them in, and dropping the agent's "Vikunja has no in-cluster tool" caveat from its systemPrompt, is a follow-up PR once this backend is confirmedReadyand discoverable.
SPOF note¶
Vikunja + its CNPG cluster become a dependency for the fleet's task read/write path. Mitigations in place: CNPG 3-instance with weekly Barman backup, Longhorn files PVC with weekly backup, and internal-gateway-only exposure. The app is not on the household-facing critical path (HA / media / voice), so an outage degrades automation bookkeeping, not household-user-facing services.
Troubleshooting¶
- Login loops / "invalid state" — check the Authelia OIDC client redirect URI
matches
https://vikunja.${SECRET_DOMAIN}/auth/openid/autheliaexactly, and thatOIDC_CLIENT_SECRETin thevikunja1P item matches the Authelia client secret. - API token calls 401 at the gateway — confirm no
SecurityPolicywas added in front of thevikunjaHTTPRoute; extAuth would block bearer-token API calls. - Attachments fail to upload —
/filesPVC not writable; verifyfsGroup: 1000and that the Longhorn volume is attached/healthy. - DB connection errors — check the
postgres-vikunja-appSecret is reflected intocollab(the Monica-style reflector annotations on the Cluster) andpostgres-vikunjaisCluster in healthy state.