pub struct Target {Show 16 fields
pub id: String,
pub path: PathBuf,
pub project: String,
pub exporter: String,
pub mode: String,
pub apply: bool,
pub validate: Option<String>,
pub reload: Option<String>,
pub check: Option<String>,
pub accept_rule_approval: bool,
pub require_approval: bool,
pub file_mode: Option<String>,
pub owner: Option<String>,
pub compose_project: Option<String>,
pub compose_file: Option<PathBuf>,
pub services: Vec<String>,
}Expand description
One [[target]] in the node’s config. Everything executable is here, on
this host, written by the operator. Nothing the hub sends can add to it.
Fields§
§id: String§path: PathBuf§project: String§exporter: String§mode: String§apply: boolObserve until deliberately flipped.
validate: Option<String>A command run after the bytes are written. If it contains {file} it runs against a
temporary file first and the target is replaced only when it passes.
reload: Option<String>§check: Option<String>A health check run after reload: a command, or an http://host:port/path URL that must
answer 2xx. A failure puts the previous file back and reloads it.
accept_rule_approval: boolAccept a push that carries a rule approval: a short-lived token signed by this node’s
automation_approver key, bound to this node, target, bytes and operation. Needs
automation_approver; cannot be combined with require_approval, which asks for a human.
require_approval: boolRefuse any push that does not carry the hub’s signed approval of exactly these bytes (Phase 37). Set here, on the host, so a hub bug or a hub policy change cannot turn it off.
file_mode: Option<String>Permission bits of the written file, as octal text ("0400"). Unix only. A Compose
target defaults to 0400; any other target keeps the mode the file already has.
owner: Option<String>Owner of the written file as numeric uid or uid:gid (the user inside the container
that reads the secret, e.g. 999:999 for the Postgres image). Needs the node to run as
root or that user. Unix only.
compose_project: Option<String>Makes this a Docker Compose secret-file target: after the write the node runs
docker compose -p <project> -f <compose_file> config -q and then recreates only
services. Replaces validate and reload, which it generates.
compose_file: Option<PathBuf>§services: Vec<String>