wip: added an implementation of CRDalertmanagerconfigs that can be used to add a discord webhook receiver, currently the namespace is hard coded and there are a bunch of todos!() that need to be cleaned up, and flags need to be added so that alertmanager will automatically register the crd
This commit is contained in:
@@ -3,10 +3,9 @@ use std::{path::PathBuf, sync::Arc};
|
||||
use harmony::{
|
||||
inventory::Inventory,
|
||||
maestro::Maestro,
|
||||
modules::application::{
|
||||
ApplicationScore, RustWebFramework, RustWebapp,
|
||||
features::{ContinuousDelivery, Monitoring},
|
||||
},
|
||||
modules::{application::{
|
||||
features::{ContinuousDelivery, PrometheusApplicationMonitoring}, ApplicationScore, RustWebFramework, RustWebapp
|
||||
}, monitoring::alert_channel::discord_alert_channel::DiscordWebhook},
|
||||
topology::{K8sAnywhereTopology, Url},
|
||||
};
|
||||
|
||||
@@ -20,12 +19,20 @@ async fn main() {
|
||||
framework: Some(RustWebFramework::Leptos),
|
||||
});
|
||||
|
||||
let discord_receiver = DiscordWebhook {
|
||||
name: "test-discord".to_string(),
|
||||
url: Url::Url(url::Url::parse("https://discord.doesnt.exist.com").unwrap()),
|
||||
};
|
||||
|
||||
let app = ApplicationScore {
|
||||
features: vec![
|
||||
Box::new(ContinuousDelivery {
|
||||
// Box::new(ContinuousDelivery {
|
||||
// application: application.clone(),
|
||||
// }),
|
||||
Box::new(PrometheusApplicationMonitoring {
|
||||
application: application.clone(),
|
||||
alert_receiver: vec![Box::new(discord_receiver),]
|
||||
}),
|
||||
Box::new(Monitoring {}),
|
||||
// TODO add monitoring, backups, multisite ha, etc
|
||||
],
|
||||
application,
|
||||
|
||||
Reference in New Issue
Block a user