Edit mode
Edit mode runs your local code against the cluster, so a change takes effect without rebuilding a container. A reloader in the config says how: mirrord runs your process locally with a pod’s network and filesystem, and Skaffold covers cases mirrord can’t, such as programs that use mmap.
$ xianyun run # run every reloader until you interrupt it
$ xianyun logs # read what the processes printed
This is the least finished part of Xianyun. run starts the reloaders concurrently and waits for all of them before it returns, handles Ctrl-C and SIGTERM, and runs stop hooks. The pieces that run your edit_mode_processes under mirrord aren’t implemented: the internal process supervisor stops after its preflight checks, so a mirror reloader’s processes can’t start. xianyun status also returns an error when the cluster is Ready and reloaders are configured. See Known limitations.
run isn’t available over MCP. It runs until interrupted, which doesn’t fit a single request and response. xianyun_logs is available, and returns the last lines of the reloaders’ logs.
A reloader
reloaders:
gitaly:
type: mirror
repository: gitaly
edit_mode: true
mirror:
target:
namespace: gitlab
kubernetes_type: pod
name: gitlab-gitaly-0
edit_mode_processes:
gitaly:
command: _build/bin/gitaly /etc/gitaly/config.toml
examples/simple-helm-chart-k3d.yaml has a complete file. The repository must be listed under repositories with edit_mode: true, so xianyun update clones it.
Hooks
lifecycle_hooks run commands around edit mode: edit_mode_prepare during up, and edit_mode_start and edit_mode_stop during run. They run with no shell and your full environment. Read the configuration reference and Security before you add one from a source you don’t control.