diff --git a/harmony/src/domain/topology/k8s.rs b/harmony/src/domain/topology/k8s.rs index c3ad628..08868e8 100644 --- a/harmony/src/domain/topology/k8s.rs +++ b/harmony/src/domain/topology/k8s.rs @@ -43,7 +43,11 @@ impl K8sClient { Ok(result) } - pub async fn apply_namespaced(&self, resource: &Vec, ns: Option<&str>) -> Result + pub async fn apply_namespaced( + &self, + resource: &Vec, + ns: Option<&str>, + ) -> Result, Error> where K: Resource + Clone @@ -53,14 +57,15 @@ impl K8sClient { + Default, ::DynamicType: Default, { + let mut resources = Vec::new(); for r in resource.iter() { let api: Api = match ns { Some(ns) => Api::namespaced(self.client.clone(), ns), None => Api::default_namespaced(self.client.clone()), }; - api.create(&PostParams::default(), &r).await?; + resources.push(api.create(&PostParams::default(), &r).await?); } - todo!("") + Ok(resources) } pub(crate) async fn from_kubeconfig(path: &str) -> Option { diff --git a/harmony/src/modules/lamp.rs b/harmony/src/modules/lamp.rs index 560673f..5388001 100644 --- a/harmony/src/modules/lamp.rs +++ b/harmony/src/modules/lamp.rs @@ -131,9 +131,8 @@ impl Interpret for LAMPInterpret { .await?; info!("LAMP deployment_score {deployment_score:?}"); - todo!("1. [x] Use HelmChartScore to deploy mariadb - 2. [x] Use deploymentScore to deploy lamp docker container - 3. for remote clusters, push the image to some registry (use nationtech's for demos? push to the cluster's registry?)"); + + Ok(Outcome::success("Successfully deployed LAMP Stack!".to_string())) } fn get_name(&self) -> InterpretName {