Skip to content

Commit

Permalink
fix: use the correct OCI registry environment variables for newer hosts
Browse files Browse the repository at this point in the history
In wasmCloud 0.81.0 we deprecated the old `OCI_REGISTRY` variables in
favor of prefixing them with `WASMCLOUD`. 0.82.0 fully removed those
variables, so this updates the controller to use the new variables with
an eye towards wasmCloud 1.0 compatibility.

Signed-off-by: Dan Norris <protochron@users.noreply.github.com>
  • Loading branch information
protochron committed Mar 28, 2024
1 parent 0756cde commit debadb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ async fn configure_hosts(config: &WasmCloudHostConfig, ctx: Arc<Context>) -> Res

env_vars = vec![
EnvVar {
name: "OCI_REGISTRY_USER".to_string(),
name: "WASMCLOUD_OCI_REGISTRY_USER".to_string(),
value: Some(
docker_config
.auths
Expand All @@ -483,7 +483,7 @@ async fn configure_hosts(config: &WasmCloudHostConfig, ctx: Arc<Context>) -> Res
..Default::default()
},
EnvVar {
name: "OCI_REGISTRY_PASSWORD".to_string(),
name: "WASMCLOUD_OCI_REGISTRY_PASSWORD".to_string(),
value: Some(
docker_config
.auths
Expand All @@ -497,7 +497,7 @@ async fn configure_hosts(config: &WasmCloudHostConfig, ctx: Arc<Context>) -> Res
..Default::default()
},
EnvVar {
name: "OCI_REGISTRY".to_string(),
name: "WASMCLOUD_OCI_REGISTRY".to_string(),
value: Some(docker_config.auths.keys().next().unwrap().clone()),
..Default::default()
},
Expand Down

0 comments on commit debadb3

Please sign in to comment.