forked from NationTech/harmony
		
	fix: Remove todo statements for lamp score and k8s related features that are now complete!
This commit is contained in:
		
							parent
							
								
									94f6cc6942
								
							
						
					
					
						commit
						8d3d167848
					
				| @ -43,7 +43,11 @@ impl K8sClient { | |||||||
|         Ok(result) |         Ok(result) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     pub async fn apply_namespaced<K>(&self, resource: &Vec<K>, ns: Option<&str>) -> Result<K, Error> |     pub async fn apply_namespaced<K>( | ||||||
|  |         &self, | ||||||
|  |         resource: &Vec<K>, | ||||||
|  |         ns: Option<&str>, | ||||||
|  |     ) -> Result<Vec<K>, Error> | ||||||
|     where |     where | ||||||
|         K: Resource<Scope = NamespaceResourceScope> |         K: Resource<Scope = NamespaceResourceScope> | ||||||
|             + Clone |             + Clone | ||||||
| @ -53,14 +57,15 @@ impl K8sClient { | |||||||
|             + Default, |             + Default, | ||||||
|         <K as kube::Resource>::DynamicType: Default, |         <K as kube::Resource>::DynamicType: Default, | ||||||
|     { |     { | ||||||
|  |         let mut resources = Vec::new(); | ||||||
|         for r in resource.iter() { |         for r in resource.iter() { | ||||||
|             let api: Api<K> = match ns { |             let api: Api<K> = match ns { | ||||||
|                 Some(ns) => Api::namespaced(self.client.clone(), ns), |                 Some(ns) => Api::namespaced(self.client.clone(), ns), | ||||||
|                 None => Api::default_namespaced(self.client.clone()), |                 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<K8sClient> { |     pub(crate) async fn from_kubeconfig(path: &str) -> Option<K8sClient> { | ||||||
|  | |||||||
| @ -131,9 +131,8 @@ impl<T: Topology + K8sclient + HelmCommand> Interpret<T> for LAMPInterpret { | |||||||
|             .await?; |             .await?; | ||||||
| 
 | 
 | ||||||
|         info!("LAMP deployment_score {deployment_score:?}"); |         info!("LAMP deployment_score {deployment_score:?}"); | ||||||
|         todo!("1. [x] Use HelmChartScore to deploy mariadb
 | 
 | ||||||
|             2. [x] Use deploymentScore to deploy lamp docker container |         Ok(Outcome::success("Successfully deployed LAMP Stack!".to_string())) | ||||||
|             3. for remote clusters, push the image to some registry (use nationtech's for demos? push to the cluster's registry?)");
 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     fn get_name(&self) -> InterpretName { |     fn get_name(&self) -> InterpretName { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user