Watch
0
0
Fork
You've already forked hyperhive
0

let the operator set, replace and remove an agent's backend env from the swarm ui

This commit is contained in:
atlas 2026-10-28 01:33:52 +01:00 • committed by mara
commit 57b04d6c49

View file

@ -289,6 +289,16 @@ the store down at a start the file alone carries the agent. Both read it at
their own start, so a changed value reaches a running agent at its next
restart.
To set or replace a key, use **set the API-key environment** on the agent in the swarm UI:
it sends `PUT /api/hives/{hive}/agents/{agent}/backend-env` with the file text,
which must be blank lines, `#` or `;` comments, and `NAME=VALUE` lines of at
most 16 KiB. A save overwrites the stored text, including text the agent wrote
into an empty leaf, and the store's value wins over the file. The box never
shows the stored text. **Remove** (`DELETE` on the same path) deletes the stored
text. An agent whose file has content creates the leaf from it again within 2
minutes; one without a file keeps its copy in `/run` until the container
restarts.
Provision the file once, out of band (never through nix — an API key in
the store is world-readable and travels with the flake closure):