Whilst Kubernetes uses YAML files, often templated through tools like Helm, OpenFaaS Edge uses a docker-compose.yaml file to configure its own core services.
Core services are the containers required to run the OpenFaaS control-plane. Additional stateful containers such as Grafana, Postgresql, Redis, etc can also be managed by OpenFaaS Edge.
faasd implements a sub-set of the Docker Compose spec.
The easiest way to add a new service, is to refer to the examples in the eBook Serverless For Everyone Else, or to adapt an existing service.
image - full path to container image
command - command to run in the container
environment - environment variables to set in the container
volumes - volumes to mount in the container from the host. Only files created at /var/lib/faasd are supported for the source path.
ports - ports to expose on the host - either on all adapters or only on loopback. Most of the time, you should only ever expose ports on the loopback interface.
restart - restart policy for the container - either empty to disable restarts or always
deploy.replicas - set this value to 0 to disable a service, or remove the YAML to enable it
user - user to run the container as - this must be a string, even if it is a number i.e. "65534"