alpha-worker nodes have 15.6 GiB roots with a few GiB free; pulling the 1 GiB api image onto several of them at once tripped DiskPressure and evicted the pods. Prefer co-locating every Funkwhale pod so the image is pulled once, and request ephemeral storage so the scheduler skips nearly full nodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ansible-role-funkwhale
Deploys Funkwhale 2.0.13, eom.dev's federated music and podcast server, to Kubernetes as plain manifests.
It fits in with the rest of eom.dev:
- Login goes through Dex, using the funkwhale-oidc plugin and the same "eom.dev account" button as the other services.
/loginsends you straight to Dex.- Any account Dex lets through gets a Funkwhale account on first login, with a federation actor and libraries. The local sign-up form stays closed.
- Users listed in
funkwhale_oidc_admin_usersbecome superusers. - When Dex is down, use the break-glass
breakglasslogin at/login?local=1.
- Look: Catppuccin Latte in light mode and Mocha in dark mode, the same palette as
dex.eom.dev, listmonk and www. The neutral surfaces, every alert and tag palette, and the font come fromfiles/catppuccin.css. Primary (mauve) and accent (lavender) come from Funkwhale's own theme-colour settings. Users can still pick light, dark or auto. - Mail goes out through
postfix.eom.dev:587as the LDAP accountnews, the same account listmonk uses. - Cluster conventions:
ca-issuerTLS,nfs-clientvolumes, and anti-affinity that keeps the pods off the ingress-nginx node.
What it creates
| Object | Purpose |
|---|---|
Secret/funkwhale |
Django key, DB password, SMTP URL, break-glass admin password, Dex client secret |
ConfigMap/funkwhale |
Everything else, as environment variables |
StatefulSet/funkwhale-db |
PostgreSQL 17 (alpine, uid 70) |
Deployment/funkwhale-redis |
Cache and Celery broker; no persistence |
Deployment/funkwhale-api |
Gunicorn. Init containers install the plugin, then run migrate and collectstatic |
Deployment/funkwhale-celeryworker, -celerybeat |
Background jobs (imports, federation, transcoding) and their scheduler |
Deployment/funkwhale-front |
Funkwhale's nginx and web app, with the plugin's login button and its /accounts/ route |
PVC/funkwhale-{media,music,static} |
Uploads, in-place music library, Django static files (RWX) |
Ingress/funkwhale |
https://funkwhale.eom.dev |
Every pod that loads Funkwhale's settings runs a plugins init container. It pip-installs funkwhale_oidc_plugin_url (a tagged archive from Gitea) and PyJWT into an emptyDir, so the stock images are used unchanged.
Instance settings live in Funkwhale's database. The role writes the ones in funkwhale_preferences / funkwhale_preferences_extra on every run, using templates/configure.py.j2 run inside the API pod. That covers the name, description, sign-up, theme colours and custom CSS. The same script also creates the break-glass admin, or resets its password. Anything else stays under the admin UI's control.
Secrets
| Variable | Notes |
|---|---|
funkwhale_oidc_client_secret |
Required. Must match the funkwhale client in Dex. Vault: funkwhale_dex_client_secret |
funkwhale_smtp_password |
Required. Password of the news LDAP account. Vault: listmonk_smtp_password |
funkwhale_django_secret_key, funkwhale_db_password, funkwhale_admin_password |
Optional. If empty, they are generated on the first run, stored in Secret/funkwhale and reused afterwards |
To read the break-glass password:
kubectl -n funkwhale get secret funkwhale -o jsonpath='{.data.FUNKWHALE_CLI_USER_PASSWORD}' | base64 -d
One-time setup outside this role
Add the funkwhale client to Dex (ericomeehan.dex/playbooks/deploy-eom.yml) with this redirect URI, then run that play:
https://funkwhale.eom.dev/accounts/oidc/dex/login/callback/
Upgrading Funkwhale
- Bump
funkwhale_version. - Run the plugin's end-to-end test (
funkwhale-oidc/tests/compose.yaml) against the new version. - Check that the theme still applies. It overrides the
--color-default-*and--fw-*variables fromfront/src/ui/fw.css.
Never change funkwhale_host after the first deploy. Every federated object carries it.
Testing
ansible-playbook -i tests/inventory tests/render.yml # renders into .render/
To validate against the cluster without changing anything, pipe the rendered manifests into kubectl apply --dry-run=server -f -.
License
MIT-0