let the operator set, replace and remove an agent's backend env from the swarm ui
This commit is contained in:
parent
398b2af44b
commit
57b04d6c49
1 changed files with 795 additions and 201 deletions
|
|
@ -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):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue