App Controller is a REST API server that allow managing remotely-accessible graphical applications on a kubernetes cluster. The purpose of this is to allow easily integrating native desktop applications into web user interfaces.
App Controller is a Rust project that tries to follow language standards as much as possible. To run, clone with git, and cargo build:
git clone https://github.com/twizmwazin/app-controller.git
cd app-controller
cargo build --releaseApp Controller is published automatically to ghcr.io on each commit to main.
Run with Kubernetes backend (default):
docker run -p 3000:3000 -v $HOME/.kube/config:/etc/kube/config \
ghcr.io/twizmwazin/app-controller/app-controllerRun with Docker backend:
docker run -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock \
-e APP_CONTROLLER_BACKEND=docker \
ghcr.io/twizmwazin/app-controller/app-controllerDocumentation is served automatically at /doc on App Controller. This can be
easily viewed on a developer machine by running App Controller in a container
and using a web browser. First, run the container with the null backend:
docker run --rm -e APP_CONTROLLER_BACKEND=null -p 3000:3000 \
ghcr.io/twizmwazin/app-controller/app-controllerThen, open http://localhost:3000 in a web browser.
App Controller currently does not accept any command line parameters. It does read from a few environment variables:
APP_CONTROLLER_BACKEND:kubernetes(default),docker, ornull. With the kubernetes backend, all functionality is supported on Kubernetes clusters. With the docker backend, all functionality is supported using local Docker. With the null backend, all endpoints should respond without erroring, but do not execute any functionality. This is intended for testing and reading the integrated documentation.RUST_LOG: Controls the log level. Common values areerror,warn,info,debug,trace, oroff. See here for more information.
There are also backend-specific options:
- Kubernetes:
KUBE_CONFIG: This file points to the Kubernetes client configuration to be used by App Controller. Default is~/.kube/config.
App Controller stores as little data as possible, all in the container backend.
For Kubernetes, this is a series of labels, annotations, and config objects. See ./src/backend/kubernetes.rs for details.
For Docker, this is stored in container labels and Docker volumes. Labels store most metadata, and local volumes are used in place of configmaps. See ./src/backend/docker.rs for more.