Skip to content

Commit

Permalink
Actually use the correct docker image when docker_image_name is used (#…
Browse files Browse the repository at this point in the history
…3261)

## Motivation

The docker image name is not actually getting propagated to the helmfile

## Proposal

Properly propagate the docker image name down to the helmfime, so the specified image is actaully used

## Test Plan

Ran with a custom image, and it worked.

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
  • Loading branch information
ndr-ds authored Feb 6, 2025
1 parent 19ae210 commit fd737d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions linera-service/src/cli_wrappers/helmfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ impl HelmFile {
github_root: &Path,
num_shards: usize,
cluster_id: u32,
docker_image_name: String,
) -> Result<()> {
let chart_dir = format!("{}/kubernetes/linera-validator", github_root.display());

Expand All @@ -29,6 +30,7 @@ impl HelmFile {
format!("working/server_{server_config_id}.json"),
)
.env("LINERA_HELMFILE_SET_NUM_SHARDS", num_shards.to_string())
.env("LINERA_HELMFILE_LINERA_IMAGE", docker_image_name)
.arg("sync")
.arg("--wait")
.args(["--kube-context", &format!("kind-{}", cluster_id)])
Expand Down
2 changes: 1 addition & 1 deletion linera-service/src/cli_wrappers/local_kubernetes_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ impl LocalKubernetesNet {
base_dir.join(&server_config_filename),
)?;

HelmFile::sync(i, &github_root, num_shards, cluster_id).await?;
HelmFile::sync(i, &github_root, num_shards, cluster_id, docker_image_name).await?;

let mut kubectl_instance = kubectl_instance.lock().await;
let output = kubectl_instance.get_pods(cluster_id).await?;
Expand Down

0 comments on commit fd737d8

Please # to comment.