fix: Remove todo statements for lamp score and k8s related features that are now complete!

This commit is contained in:
Jean-Gabriel Gill-Couture 2025-05-06 14:46:57 -04:00
parent 94f6cc6942
commit 8d3d167848
2 changed files with 10 additions and 6 deletions

View File

@ -43,7 +43,11 @@ impl K8sClient {
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
K: Resource<Scope = NamespaceResourceScope>
+ Clone
@ -53,14 +57,15 @@ impl K8sClient {
+ Default,
<K as kube::Resource>::DynamicType: Default,
{
let mut resources = Vec::new();
for r in resource.iter() {
let api: Api<K> = 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<K8sClient> {

View File

@ -131,9 +131,8 @@ impl<T: Topology + K8sclient + HelmCommand> Interpret<T> 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 {