fix: install_prometheus takes inventory from the maestro rather than inventory::autoload
This commit is contained in:
parent
3c20574e6f
commit
b1755c183d
@ -13,7 +13,8 @@ pub trait AlertSender: Send + Sync + std::fmt::Debug + Installable {
|
||||
fn name(&self) -> String;
|
||||
async fn install<T: Topology + HelmCommand>(
|
||||
&self,
|
||||
topology: T,
|
||||
inventory: &Inventory,
|
||||
topology: &T,
|
||||
) -> Result<Outcome, InterpretError>;
|
||||
}
|
||||
|
||||
@ -33,7 +34,7 @@ impl<S: AlertSender + Installable, T: Topology> Interpret<T> for AlertingInterpr
|
||||
for receiver in self.receivers.iter() {
|
||||
receiver.install(&self.sender).await?;
|
||||
}
|
||||
self.sender.ensure_installed();
|
||||
self.sender.ensure_installed().await?;
|
||||
Ok(Outcome::success(format!(
|
||||
"successfully installed alert sender {}",
|
||||
self.sender.name()
|
||||
|
@ -27,9 +27,10 @@ impl AlertSender for Prometheus {
|
||||
}
|
||||
async fn install<T: Topology + HelmCommand + Send + Sync>(
|
||||
&self,
|
||||
topology: T,
|
||||
inventory: &Inventory,
|
||||
topology: &T,
|
||||
) -> Result<Outcome, InterpretError> {
|
||||
let _ = self.install_prometheus(topology).await;
|
||||
let _ = self.install_prometheus(inventory, topology).await;
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
@ -91,11 +92,12 @@ impl Prometheus {
|
||||
|
||||
pub async fn install_prometheus<T: Topology + HelmCommand + Send + Sync>(
|
||||
&self,
|
||||
topology: T,
|
||||
inventory: &Inventory,
|
||||
topology: &T,
|
||||
) -> Result<Outcome, InterpretError> {
|
||||
kube_prometheus_helm_chart_score(self.config.clone())
|
||||
.create_interpret()
|
||||
.execute(&Inventory::autoload(), &topology)
|
||||
.execute(inventory, topology)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user