From 4d6615f1835e54ca80fbb6d5f87d23027454647f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Thu, 9 May 2024 12:47:45 +0200 Subject: [PATCH] 0.2.10 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- agent/Cargo.toml | 2 +- dist/Cargo.toml | 2 +- dist/src/pack.rs | 7 ++++--- k8s/Cargo.toml | 2 +- operator/Cargo.toml | 2 +- operator/src/install.rs | 4 ++-- package/Cargo.toml | 2 +- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 812cf63..ed04b5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -198,7 +198,7 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "agent" -version = "0.2.9" +version = "0.2.10" dependencies = [ "anyhow", "chrono", @@ -796,7 +796,7 @@ dependencies = [ [[package]] name = "dist" -version = "0.2.9" +version = "0.2.10" dependencies = [ "anyhow", "clap", @@ -1420,7 +1420,7 @@ dependencies = [ [[package]] name = "k8s" -version = "0.2.9" +version = "0.2.10" dependencies = [ "anyhow", "chrono", @@ -1814,7 +1814,7 @@ dependencies = [ [[package]] name = "operator" -version = "0.2.9" +version = "0.2.10" dependencies = [ "actix-web", "async-trait", @@ -1860,7 +1860,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "package" -version = "0.2.9" +version = "0.2.10" dependencies = [ "anyhow", "futures", @@ -3178,7 +3178,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vynil" -version = "0.2.9" +version = "0.2.10" [[package]] name = "want" diff --git a/Cargo.toml b/Cargo.toml index 3a07180..867ac97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vynil" -version = "0.2.9" +version = "0.2.10" authors = ["Sébastien Huss "] edition = "2021" license = " BSD-3-Clause" diff --git a/agent/Cargo.toml b/agent/Cargo.toml index fb22e14..29b8d19 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent" -version = "0.2.9" +version = "0.2.10" authors = ["Sébastien Huss "] edition = "2021" license = " BSD-3-Clause" diff --git a/dist/Cargo.toml b/dist/Cargo.toml index a9ccdec..21d5191 100644 --- a/dist/Cargo.toml +++ b/dist/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dist" -version = "0.2.9" +version = "0.2.10" authors = ["Sébastien Huss "] edition = "2021" license = " BSD-3-Clause" diff --git a/dist/src/pack.rs b/dist/src/pack.rs index 99412ed..d6449bd 100644 --- a/dist/src/pack.rs +++ b/dist/src/pack.rs @@ -78,7 +78,8 @@ pub fn run(args:&Parameters) -> Result<()> { let dest_dir = fs::canonicalize(&tmp).unwrap(); // Start the script engine - let mut script = script::Script::from_dir(&path.clone(), &"pack".to_string(), script::new_context( + let stage = "pack".to_string(); + let mut script = script::Script::from_dir(&path.clone(), &stage, script::new_context( yaml.category.clone(), yaml.metadata.name.clone(), yaml.metadata.name.clone(), @@ -87,13 +88,13 @@ pub fn run(args:&Parameters) -> Result<()> { &yaml.get_values(&serde_json::Map::new()) )); // run the pre-pack stage if any - let stage = "pack".to_string(); match script.run_pre_stage(&stage) {Ok(_) => {}, Err(e) => {return Err(e)}} // look source directory let mut copies: Vec = Vec::new(); let re_kusto = Regex::new(r"^kustomization\.yaml$").unwrap(); let re_kustohbs = Regex::new(r"^kustomization\.yaml\.hbs$").unwrap(); let re_rhai = Regex::new(r"\.rhai$").unwrap(); + let re_pack = Regex::new(r"pack\.rhai$").unwrap(); let re_hbs = Regex::new(r"\.hbs$").unwrap(); let re_ymlhbs = Regex::new(r"\.yaml\.hbs$").unwrap(); let re_yml = Regex::new(r"\.yaml$").unwrap(); @@ -123,7 +124,7 @@ pub fn run(args:&Parameters) -> Result<()> { use_templates = true; copies.push(path); } else if re_tf.is_match(filename) || - (re_rhai.is_match(filename) && (script.have_stage("install") || script.have_stage("destroy") || script.have_stage("plan") || script.have_stage("template"))) { + (re_rhai.is_match(filename) && !re_pack.is_match(filename)) { copies.push(path); } } diff --git a/k8s/Cargo.toml b/k8s/Cargo.toml index 96a022c..5df8897 100644 --- a/k8s/Cargo.toml +++ b/k8s/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "k8s" -version = "0.2.9" +version = "0.2.10" edition = "2021" license = " BSD-3-Clause" diff --git a/operator/Cargo.toml b/operator/Cargo.toml index 2eb8280..3a58017 100644 --- a/operator/Cargo.toml +++ b/operator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "operator" -version = "0.2.9" +version = "0.2.10" authors = ["Sébastien Huss "] edition = "2021" default-run = "operator" diff --git a/operator/src/install.rs b/operator/src/install.rs index 9517a3f..e0c3245 100644 --- a/operator/src/install.rs +++ b/operator/src/install.rs @@ -223,7 +223,7 @@ impl Reconciler for Install { events::from_delete("Install", &name, "Job", &job.name_any(), Some(job.object_ref(&()))) ).await.map_err(Error::KubeError)?; jobs.delete(agent_name.as_str()).await.unwrap(); - error!("Recreating {agent_name} Job"); + info!("Recreating {agent_name} Job"); recorder.publish( events::from_create("Install", &name, "Job", &job.name_any(), Some(job.object_ref(&()))) ).await.map_err(Error::KubeError)?; @@ -231,7 +231,7 @@ impl Reconciler for Install { }}; if let Some(status) = job.status { if status.completion_time.is_none() { - error!("Waiting after {agent_name} Job"); + info!("Waiting after {agent_name} Job"); recorder.publish( events::from_check("Install", &name, "Bootstrap in progress, requeue".to_string(), None) ).await.map_err(Error::KubeError)?; diff --git a/package/Cargo.toml b/package/Cargo.toml index e76bbf4..66d9408 100644 --- a/package/Cargo.toml +++ b/package/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "package" -version = "0.2.9" +version = "0.2.10" authors = ["Sébastien Huss "] edition = "2021" license = " BSD-3-Clause"