Watch
0
0
Fork
You've already forked hyperhive
0

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:
atlas 2026-10-22 07:43:50 +02:00
commit f3c0a87c0f
13 changed files with 54 additions and 31 deletions

View file

@ -1175,12 +1175,12 @@ mod tests {
);
}
/// The queue address reaches the harness as env only. The agent module
/// declares no `services.hyperhive.agent.queue.*` option, so rendering one
/// into the meta flake fails every agent's evaluation.
/// The queue address reaches the container in its hive facts, so the render
/// carries neither it nor any `services.hyperhive.agent.queue.*` option,
/// which no agent module declares.
#[test]
fn queue_address_is_forwarded_as_env_and_no_option() {
assert!(FORWARDED_VARS.contains(&"HIVE_AGENT_NATS_URL"));
fn queue_address_is_not_rendered_into_the_flake() {
assert!(!FORWARDED_VARS.contains(&"HIVE_AGENT_NATS_URL"));
assert!(
!FORWARDED_VARS.contains(&"HIVE_AGENT_OIDC_TOKEN_ENDPOINT"),
"no agent reads a token endpoint"