Matrix-controlled Kubernetes deployment toggle operator. Connects to a Matrix homeserver with E2E encryption and listens for chat commands to scale a K8s deployment between 0 and 1 replicas.



docker run --rm xomoxcc/openclaw-k8s-toggle-operator:latest
| Command | Action |
|---|---|
start / on | Scale deployment to 1 replica |
stop / off | Scale deployment to 0 replicas |
status | Show deployment replica counts |
help | Show available commands |
| Variable | Description | Default |
|---|---|---|
MATRIX_HOMESERVER | Matrix homeserver URL | http://synapse.matrix.svc.cluster.local:8008 |
MATRIX_USER | Matrix bot username (required) | -- |
MATRIX_PASSWORD | Matrix bot password (required) | -- |
ALLOWED_USERS | Comma-separated full Matrix user IDs (required) | -- |
DEPLOYMENT_NAME | K8s Deployment to toggle | clawdbot |
DEPLOYMENT_NAMESPACE | Namespace of the target Deployment | clawdbot |
CRYPTO_STORE_PATH | Path for E2E encryption crypto store | /data/crypto_store |
AUTH_METHOD | Auth method (password, sso, or jwt) | password |
ECHO_MODE | Echo user messages with lobster emoji before processing | true |
LOGURU_LEVEL | Log verbosity (DEBUG, INFO, WARNING, ...) | DEBUG |
Set AUTH_METHOD=jwt to authenticate via Keycloak ROPC grant instead of direct Matrix password login. The bot obtains a JWT from Keycloak and presents it to Synapse for validation via JWKS.
| Variable | Description | Default |
|---|---|---|
AUTH_METHOD | Auth method (password, sso, or jwt) | password |
KEYCLOAK_URL | Keycloak base URL (required if jwt) | -- |
KEYCLOAK_REALM | Keycloak realm name (required if jwt) | -- |
KEYCLOAK_CLIENT_ID | Keycloak client ID (required if jwt) | -- |
KEYCLOAK_CLIENT_SECRET | Keycloak client secret | "" |
JWT_LOGIN_TYPE | Matrix login type for JWT auth | com.famedly.login.token.oauth |
Requires synapse-token-authenticator on the Synapse side. See the setup guide for step-by-step instructions.
The operator runs as a single-replica Deployment with a namespace-scoped ServiceAccount. The crypto store must be on a persistent volume or the bot loses decryption keys on restart. See the README for full RBAC and Deployment manifests.
python:3.14-slim-trixiepythonuser)tini -- with openclaw-k8s-toggle-operator as default CMDlibolm-dev for E2E encryptionlinux/amd64, linux/arm64# Simple local build
docker build -t openclaw-k8s-toggle-operator .
# Multi-arch build & push
./build-container-multiarch.sh
# Local-only build (no push)
./build-container-multiarch.sh onlylocal
# Docker Hub login only
./build-container-multiarch.sh login
This project is licensed under the LGPL where applicable/possible — see LICENSE.md. Some files/parts may use other licenses: MIT | GPL | LGPL. Always check per‑file headers/comments.
This is a development/experimental project. For production use, review security settings, customize configurations, and test thoroughly in your environment. Provided "as is" without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. Use at your own risk.
Content type
Image
Digest
sha256:fbc00f800…
Size
247 MB
Last updated
7 months ago
docker pull xomoxcc/openclaw-k8s-toggle-operator