feat(#1930): forward otel headers credential into agent containers via nspawn --load-credential
This commit is contained in:
parent
838cc9af9a
commit
21ec7dc23d
6 changed files with 140 additions and 20 deletions
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
use anyhow::{Context as _, Result, bail};
|
||||
use hive_sh4re::priv_proto::{
|
||||
BindMount, InfraAction, InfraContainer, JournalQuery, NetworkIsolation, PRIV_SOCK, PrivEvent,
|
||||
PrivRequest, PrivResponse, PrivStream,
|
||||
BindMount, CredentialMount, InfraAction, InfraContainer, JournalQuery, NetworkIsolation,
|
||||
PRIV_SOCK, PrivEvent, PrivRequest, PrivResponse, PrivStream,
|
||||
};
|
||||
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
|
||||
use tokio::net::UnixStream;
|
||||
|
|
@ -179,11 +179,13 @@ pub async fn write_nspawn_flags(
|
|||
container: &str,
|
||||
binds: &[BindMount],
|
||||
isolation: Option<NetworkIsolation>,
|
||||
load_credentials: &[CredentialMount],
|
||||
) -> Result<()> {
|
||||
ok(call(&PrivRequest::WriteNspawnFlags {
|
||||
container: container.to_owned(),
|
||||
binds: binds.to_vec(),
|
||||
isolation,
|
||||
load_credentials: load_credentials.to_vec(),
|
||||
})
|
||||
.await?)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue