fix: unjank the demo #85
@ -4,12 +4,10 @@ use harmony::{
|
|||||||
inventory::Inventory,
|
inventory::Inventory,
|
||||||
maestro::Maestro,
|
maestro::Maestro,
|
||||||
modules::application::{
|
modules::application::{
|
||||||
ApplicationScore, RustWebFramework, RustWebapp,
|
ApplicationScore, RustWebFramework, RustWebapp,
|
||||||
features::{ContinuousDelivery, Monitoring},
|
features::{ContinuousDelivery, Monitoring},
|
||||||
},
|
|
||||||
topology::{
|
|
||||||
K8sAnywhereTopology, Url,
|
|
||||||
},
|
},
|
||||||
|
topology::{K8sAnywhereTopology, Url},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use base64::{Engine as _, engine::general_purpose};
|
use base64::{Engine as _, engine::general_purpose};
|
||||||
use log::{debug, info};
|
use log::{debug, info};
|
||||||
@ -5,7 +7,7 @@ use log::{debug, info};
|
|||||||
use crate::{
|
use crate::{
|
||||||
inventory::Inventory,
|
inventory::Inventory,
|
||||||
modules::{
|
modules::{
|
||||||
application::ApplicationFeature,
|
application::{ApplicationFeature, OCICompliant},
|
||||||
monitoring::{
|
monitoring::{
|
||||||
alert_channel::webhook_receiver::WebhookReceiver,
|
alert_channel::webhook_receiver::WebhookReceiver,
|
||||||
kube_prometheus::{
|
kube_prometheus::{
|
||||||
@ -19,8 +21,10 @@ use crate::{
|
|||||||
topology::{HelmCommand, K8sclient, Topology, Url, tenant::TenantManager},
|
topology::{HelmCommand, K8sclient, Topology, Url, tenant::TenantManager},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Monitoring {}
|
pub struct Monitoring {
|
||||||
|
pub application: Arc<dyn OCICompliant>,
|
||||||
|
}
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl<T: Topology + HelmCommand + K8sclient + 'static + TenantManager> ApplicationFeature<T>
|
impl<T: Topology + HelmCommand + K8sclient + 'static + TenantManager> ApplicationFeature<T>
|
||||||
@ -35,7 +39,7 @@ impl<T: Topology + HelmCommand + K8sclient + 'static + TenantManager> Applicatio
|
|||||||
// .await
|
// .await
|
||||||
|
taha marked this conversation as resolved
|
|||||||
// .expect("couldn't get tenant config")
|
// .expect("couldn't get tenant config")
|
||||||
// .name,
|
// .name,
|
||||||
namespace: "harmonydemo-staging".to_string(),
|
namespace: self.application.name(),
|
||||||
host: "localhost".to_string(),
|
host: "localhost".to_string(),
|
||||||
};
|
};
|
||||||
ntfy.create_interpret()
|
ntfy.create_interpret()
|
||||||
@ -66,7 +70,7 @@ impl<T: Topology + HelmCommand + K8sclient + 'static + TenantManager> Applicatio
|
|||||||
url::Url::parse(
|
url::Url::parse(
|
||||||
format!(
|
format!(
|
||||||
"http://ntfy.{}.svc.cluster.local/rust-web-app?auth={ntfy_default_auth_param}",
|
"http://ntfy.{}.svc.cluster.local/rust-web-app?auth={ntfy_default_auth_param}",
|
||||||
"harmonydemo-staging".to_string()
|
self.application.name()
|
||||||
)
|
)
|
||||||
.as_str(),
|
.as_str(),
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user
rather than hardcoding namespace here