Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Jan 13, 2025
1 parent c4c5270 commit 273accc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hoprd_operator"
version = "0.2.21"
version = "0.2.22"
authors = ["HOPR Association <[email protected]>"]
edition = "2021"

Expand Down
20 changes: 11 additions & 9 deletions src/hoprd/hoprd_deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,18 @@ pub async fn build_deployment_spec(
let encoded_configuration = general_purpose::STANDARD.encode(&hoprd_spec.config);


let init_command = Some(vec![
let init_args = Some(vec![
format!(
r#"
set -e # Exit on any error
set -x;
set -e;
if ! ls /app/hoprd-db/db/hopr_logs.db* 1> /dev/null 2>&1; then
apk add --no-cache curl tar
curl -sf --retry 3 "https://storage.googleapis.com/{}/hopr_logs.tar.gz" -o /tmp/hopr_logs.tar.gz
tar xf /tmp/hopr_logs.tar.gz -C /
rm -f /tmp/hopr_logs.tar.gz
fi
echo $HOPRD_IDENTITY_FILE | base64 -d > /app/hoprd-identity/.hopr-id
apk add --no-cache curl tar;
curl -sf --retry 3 "https://storage.googleapis.com/{}/hopr_logs.tar.gz" -o /tmp/hopr_logs.tar.gz;
tar xf /tmp/hopr_logs.tar.gz -C /;
rm -f /tmp/hopr_logs.tar.gz;
fi;
echo $HOPRD_IDENTITY_FILE | base64 -d > /app/hoprd-identity/.hopr-id;
echo $HOPRD_CONFIGURATION | base64 -d > /app/hoprd-identity/config.yaml
"#,
bucket_name
Expand Down Expand Up @@ -148,7 +149,8 @@ pub async fn build_deployment_spec(
..EnvVar::default()
},
]),
command: init_command,
command: Some(vec!["sh".to_string(), "-c".to_string()]),
args: init_args,
volume_mounts: volume_mounts.to_owned(),
..Container::default()
}]),
Expand Down

0 comments on commit 273accc

Please sign in to comment.