Skip to content

Commit

Permalink
Fix agent
Browse files Browse the repository at this point in the history
  • Loading branch information
sebt3 committed May 7, 2024
1 parent d4a59e3 commit b3bc924
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion agent/src/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub async fn clone(target: &PathBuf, client: kube::Client, dist: &client::Distri

pub async fn run(args: &Parameters) -> Result<()> {
let client = get_client().await;
let mut distribs = DistribHandler::new(client.clone());
let mut distribs = DistribHandler::new(&client.clone());
let dist = match distribs.get(args.name.as_str()).await {
Ok(d) => d,
Err(e) => {
Expand Down
2 changes: 1 addition & 1 deletion agent/src/destroy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub async fn destroy(src: &PathBuf, script: &mut script::Script, client: kube::C

pub async fn run(args:&Parameters) -> Result<()> {
let client = get_client().await;
let mut installs = InstallHandler::new(client.clone(), args.namespace.as_str());
let mut installs = InstallHandler::new(&client.clone(), args.namespace.as_str());
let inst = match installs.get(args.name.as_str()).await {Ok(d) => d, Err(e) => {
events::report(AGENT, client, events::from_error(&anyhow!("{e}")), events::get_empty_ref()).await.unwrap();
bail!("{e}");
Expand Down
2 changes: 1 addition & 1 deletion agent/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub async fn install(src: &PathBuf, script: &mut script::Script, client: kube::C

pub async fn run(args:&Parameters) -> Result<()> {
let client = get_client().await;
let mut installs = InstallHandler::new(client.clone(), args.namespace.as_str());
let mut installs = InstallHandler::new(&client.clone(), args.namespace.as_str());
let inst = match installs.get(args.name.as_str()).await {Ok(d) => d, Err(e) => {
events::report(AGENT, client, events::from_error(&anyhow!("{e}")), events::get_empty_ref()).await.unwrap();
bail!("{e}");
Expand Down
2 changes: 1 addition & 1 deletion agent/src/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub async fn plan (src: &PathBuf, script: &mut script::Script, client: kube::Cli

pub async fn run(args:&Parameters) -> Result<()> {
let client = get_client().await;
let mut installs = InstallHandler::new(client.clone(), args.namespace.as_str());
let mut installs = InstallHandler::new(&client.clone(), args.namespace.as_str());
let inst = match installs.get(args.name.as_str()).await {Ok(d) => d, Err(e) => {
events::report(AGENT, client, events::from_error(&anyhow!("{e}")), events::get_empty_ref()).await.unwrap();
bail!("{e}");
Expand Down
2 changes: 1 addition & 1 deletion agent/src/template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub async fn template(src: PathBuf, dest: PathBuf, client: kube::Client,

pub async fn run(args:&Parameters) -> Result<()> {
let client = get_client().await;
let mut installs = InstallHandler::new(client.clone(), args.namespace.as_str());
let mut installs = InstallHandler::new(&client.clone(), args.namespace.as_str());
let inst = match installs.get(args.name.as_str()).await{Ok(d) => d, Err(e) => {
events::report(AGENT, client, events::from_error(&anyhow!("{e}")), events::get_empty_ref()).await.unwrap();
bail!("{e}");
Expand Down

0 comments on commit b3bc924

Please sign in to comment.