diff --git a/Cargo.lock b/Cargo.lock index ff692d7a..9a123d80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1118,7 +1118,7 @@ dependencies = [ [[package]] name = "dragonfly-client" -version = "0.1.92" +version = "0.1.93" dependencies = [ "anyhow", "blake3", @@ -1188,7 +1188,7 @@ dependencies = [ [[package]] name = "dragonfly-client-backend" -version = "0.1.92" +version = "0.1.93" dependencies = [ "dragonfly-api", "dragonfly-client-core", @@ -1210,7 +1210,7 @@ dependencies = [ [[package]] name = "dragonfly-client-config" -version = "0.1.92" +version = "0.1.93" dependencies = [ "bytesize", "bytesize-serde", @@ -1231,7 +1231,7 @@ dependencies = [ [[package]] name = "dragonfly-client-core" -version = "0.1.92" +version = "0.1.93" dependencies = [ "hyper 1.4.0", "hyper-util", @@ -1246,7 +1246,7 @@ dependencies = [ [[package]] name = "dragonfly-client-init" -version = "0.1.92" +version = "0.1.93" dependencies = [ "anyhow", "clap", @@ -1262,7 +1262,7 @@ dependencies = [ [[package]] name = "dragonfly-client-storage" -version = "0.1.92" +version = "0.1.93" dependencies = [ "base16ct", "blake3", @@ -1286,7 +1286,7 @@ dependencies = [ [[package]] name = "dragonfly-client-util" -version = "0.1.92" +version = "0.1.93" dependencies = [ "base16ct", "blake3", @@ -1755,7 +1755,7 @@ dependencies = [ [[package]] name = "hdfs" -version = "0.1.92" +version = "0.1.93" dependencies = [ "dragonfly-client-backend", "dragonfly-client-core", diff --git a/Cargo.toml b/Cargo.toml index e175d14a..c2222a98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.1.92" +version = "0.1.93" authors = ["The Dragonfly Developers"] homepage = "https://d7y.io/" repository = "https://github.com/dragonflyoss/client.git" @@ -22,13 +22,13 @@ readme = "README.md" edition = "2021" [workspace.dependencies] -dragonfly-client = { path = "dragonfly-client", version = "0.1.92" } -dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.92" } -dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.92" } -dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.92" } -dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.92" } -dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.92" } -dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.92" } +dragonfly-client = { path = "dragonfly-client", version = "0.1.93" } +dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.93" } +dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.93" } +dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.93" } +dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.93" } +dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.93" } +dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.93" } thiserror = "1.0" dragonfly-api = "2.0.141" reqwest = { version = "0.12.4", features = ["stream", "native-tls", "default-tls", "rustls-tls"] } diff --git a/dragonfly-client-init/src/container_runtime/containerd.rs b/dragonfly-client-init/src/container_runtime/containerd.rs index 3f16a900..0d8335cf 100644 --- a/dragonfly-client-init/src/container_runtime/containerd.rs +++ b/dragonfly-client-init/src/container_runtime/containerd.rs @@ -204,11 +204,16 @@ impl Containerd { // Add endpoints to the mirror configuration. let mut endpoints = Array::default(); endpoints.push(Value::from(proxy_config.addr.clone())); - endpoints.push(Value::from(registry.server_addr)); + endpoints.push(Value::from(registry.server_addr.clone())); let mut mirror_table = Table::new(); mirror_table.insert("endpoint", value(endpoints)); + // Add X-Dragonfly-Registry header to the mirror configuration. + let mut headers_table = Table::new(); + headers_table.insert(DRAGONFLY_REGISTRY_HEADER, value(registry.server_addr)); + mirror_table.insert("header", Item::Table(headers_table)); + mirrors_table.insert(®istry.host_namespace, Item::Table(mirror_table)); }