diff --git a/harmony/src/modules/helm/chart.rs b/harmony/src/modules/helm/chart.rs index 65909d3..ec90cd9 100644 --- a/harmony/src/modules/helm/chart.rs +++ b/harmony/src/modules/helm/chart.rs @@ -104,12 +104,7 @@ impl HelmChartInterpret { fn run_helm_command(args: &[&str]) -> Result { let command_str = format!("helm {}", args.join(" ")); -<<<<<<< HEAD -||||||| parent of 54062fa (make separate modules) -impl HelmChartInterpret {} -======= debug!("Got KUBECONFIG: `{}`", std::env::var("KUBECONFIG").unwrap()); ->>>>>>> 54062fa (make separate modules) debug!("Running Helm command: `{}`", command_str); let output = Command::new("helm") @@ -165,14 +160,6 @@ impl Interpret for HelmChartInterpret { self.add_repo()?; -<<<<<<< HEAD - let helm_executor = DefaultHelmExecutor::new(); -||||||| parent of 54062fa (make separate modules) - // let mut helm_options = Vec::new(); - // if self.score.create_namespace { - // helm_options.push(NonBlankString::from_str("--create-namespace").unwrap()); - // } -======= let helm_executor = DefaultHelmExecutor::new_with_opts( &NonBlankString::from_str("helm").unwrap(), None, @@ -180,62 +167,11 @@ impl Interpret for HelmChartInterpret { false, false, ); ->>>>>>> 54062fa (make separate modules) let mut helm_options = Vec::new(); if self.score.create_namespace { helm_options.push(NonBlankString::from_str("--create-namespace").unwrap()); } -<<<<<<< HEAD - - if self.score.install_only { - let chart_list = match helm_executor.list(Some(ns)) { - Ok(charts) => charts, - Err(e) => { - return Err(InterpretError::new(format!( - "Failed to list scores in namespace {:?} because of error : {}", - self.score.namespace, e - ))); - } - }; - - if chart_list - .iter() - .any(|item| item.name == self.score.release_name.to_string()) - { - info!( - "Release '{}' already exists in namespace '{}'. Skipping installation as install_only is true.", - self.score.release_name, ns - ); - - return Ok(Outcome::new( - InterpretStatus::SUCCESS, - format!( - "Helm Chart '{}' already installed to namespace {ns} and install_only=true", - self.score.release_name - ), - )); - } else { - info!( - "Release '{}' not found in namespace '{}'. Proceeding with installation.", - self.score.release_name, ns - ); - } - } - - let res = helm_executor.install_or_upgrade( - &ns, - &self.score.release_name, - &self.score.chart_name, - self.score.chart_version.as_ref(), - self.score.values_overrides.as_ref(), - yaml_path, - Some(&helm_options), - ); -||||||| parent of 54062fa (make separate modules) - let res = helm_executor.generate(); -======= ->>>>>>> 54062fa (make separate modules) if self.score.install_only { let chart_list = match helm_executor.list(Some(ns)) { diff --git a/harmony/src/modules/lamp.rs b/harmony/src/modules/lamp.rs index 5708759..3c5c439 100644 --- a/harmony/src/modules/lamp.rs +++ b/harmony/src/modules/lamp.rs @@ -135,8 +135,6 @@ impl Interpret for LAMPInterpret { info!("LAMP deployment_score {deployment_score:?}"); -<<<<<<< HEAD -<<<<<<< HEAD let lamp_ingress = K8sIngressScore { name: fqdn!("lamp-ingress"), host: fqdn!("test"), @@ -160,36 +158,6 @@ impl Interpret for LAMPInterpret { info!("LAMP lamp_ingress {lamp_ingress:?}"); -||||||| parent of f7f32d4 (Still WIP but pretty much done) - Ok(Outcome::success("Successfully deployed LAMP Stack!".to_string())) -======= ->>>>>>> f7f32d4 (Still WIP but pretty much done) -||||||| parent of ad7ca39 (reset) -======= - let lamp_ingress = K8sIngressScore { - name: fqdn!("lamp-ingress"), - host: fqdn!("test"), - backend_service: fqdn!( - >::name(&self.score) - .to_case(Case::Kebab) - .as_str() - ), - port: 8080, - path: Some(ingress_path!("/")), - path_type: None, - namespace: self - .get_namespace() - .map(|nbs| fqdn!(nbs.to_string().as_str())), - }; - - lamp_ingress - .create_interpret() - .execute(inventory, topology) - .await?; - - info!("LAMP lamp_ingress {lamp_ingress:?}"); - ->>>>>>> ad7ca39 (reset) Ok(Outcome::success( "Successfully deployed LAMP Stack!".to_string(), ))