hand agents the queue address at container start
HIVE_AGENT_NATS_URL now reaches each container in its hive facts, from the host's deploy.hive-controller.queue.agentNatsUrl, instead of being rendered into the meta flake. The agent option services.hyperhive.agent.queue.natsUrl is removed; the harness unit imports the queue credential whenever the token endpoint is set. On deploy every agent rebuilds once (the rendered flake loses the address), and the harness reads the address from the facts file hive-priv writes before each start. Refs #4857
This commit is contained in:
parent
ba97c64dda
commit
f3c0a87c0f
1 changed files with 54 additions and 31 deletions
|
|
@ -170,8 +170,8 @@ pub fn network_isolation_from_env() -> Result<hive_priv_sock::NetworkIsolation>
|
|||
}
|
||||
|
||||
/// The hive's facts every container is handed at runtime, so that no agent
|
||||
/// build carries a value that differs between hosts. The name, domain and
|
||||
/// OTEL resource labels come from hive-c0re's own unit environment
|
||||
/// build carries a value that differs between hosts. The name, domain, OTEL
|
||||
/// resource labels and queue address come from hive-c0re's own unit environment
|
||||
/// (`nix/host-modules/hive-c0re/environment.nix`), where an unset or empty
|
||||
/// variable is `None`; the dashboard port and pinned claude from `hive`.
|
||||
fn hive_facts(hive: &HiveEnv) -> hive_priv_sock::HiveFacts {
|
||||
|
|
@ -190,6 +190,7 @@ fn hive_facts_from(
|
|||
dashboard_port: Some(hive.dashboard_port),
|
||||
claude_code_path: hive.claude_code_path.clone(),
|
||||
otel_extra_resource_attributes: read("HYPERHIVE_OTEL_EXTRA_RESOURCE_ATTRIBUTES"),
|
||||
agent_nats_url: read("HIVE_AGENT_NATS_URL"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue