derive per-agent egress entries from operator-linked accounts
This commit is contained in:
parent
7eb9db47d6
commit
9193f37963
1 changed files with 852 additions and 38 deletions
|
|
@ -387,7 +387,7 @@ pub(crate) fn spawn_per_agent_upkeep(
|
|||
spawn_subagent_streams(status, hives);
|
||||
spawn_schedule_reconcile(status, hives);
|
||||
spawn_agent_permissions(status, hives);
|
||||
spawn_backend_egress_backfill(status);
|
||||
spawn_backend_egress_backfill(status, hives);
|
||||
crate::attic_copy::spawn(hives.iter().map(|h| h.name.clone()).collect());
|
||||
crate::proxy_credential::spawn(hives.iter().map(|h| h.name.clone()).collect());
|
||||
if let Some(status) = status {
|
||||
|
|
@ -406,11 +406,14 @@ fn spawn_agent_permissions(status: Option<&Arc<status::StatusReader>>, hives: &[
|
|||
}
|
||||
|
||||
/// Drop the allowed-domain entries derived from backend environments that no
|
||||
/// longer name their host, when a swarm queue is wired up.
|
||||
fn spawn_backend_egress_backfill(status: Option<&Arc<status::StatusReader>>) {
|
||||
if let Some(status) = status {
|
||||
crate::backend_egress::spawn_backfill(status.queue_client());
|
||||
}
|
||||
/// longer name their host, and make the entries derived from linked accounts
|
||||
/// match the stored accounts, when a swarm queue is wired up.
|
||||
fn spawn_backend_egress_backfill(status: Option<&Arc<status::StatusReader>>, hives: &[HiveEntry]) {
|
||||
let (Some(status), Some(wanted)) = (status, wanted_writer(status)) else {
|
||||
return;
|
||||
};
|
||||
let hives = hives.iter().map(|h| h.name.clone()).collect();
|
||||
crate::backend_egress::spawn_backfill(status.queue_client(), wanted, hives);
|
||||
}
|
||||
|
||||
/// Start rewriting every agent's schedule key from the definitions when a
|
||||
|
|
|
|||
Loading…
Reference in a new issue