fix: cargo fmt
All checks were successful
Run Check Script / check (pull_request) Successful in 1m40s
All checks were successful
Run Check Script / check (pull_request) Successful in 1m40s
This commit is contained in:
parent
f702ecd8c9
commit
b1bf4fd4d5
@ -4,7 +4,8 @@ use harmony::{
|
||||
inventory::Inventory,
|
||||
maestro::Maestro,
|
||||
modules::application::{
|
||||
features::{ContinuousDelivery, Monitoring}, ApplicationScore, RustWebFramework, RustWebapp
|
||||
ApplicationScore, RustWebFramework, RustWebapp,
|
||||
features::{ContinuousDelivery, Monitoring},
|
||||
},
|
||||
topology::{K8sAnywhereTopology, Url},
|
||||
};
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
use async_trait::async_trait;
|
||||
use log::info;
|
||||
|
||||
@ -6,19 +5,21 @@ use crate::{
|
||||
inventory::Inventory,
|
||||
modules::{
|
||||
application::{Application, ApplicationFeature},
|
||||
monitoring::{application_monitoring::k8s_application_monitoring_score::ApplicationPrometheusMonitoringScore, kube_prometheus::{
|
||||
helm_prometheus_alert_score::HelmPrometheusAlertingScore,
|
||||
types::{NamespaceSelector, ServiceMonitor},
|
||||
}},
|
||||
monitoring::{
|
||||
application_monitoring::k8s_application_monitoring_score::ApplicationPrometheusMonitoringScore,
|
||||
kube_prometheus::{
|
||||
helm_prometheus_alert_score::HelmPrometheusAlertingScore,
|
||||
types::{NamespaceSelector, ServiceMonitor},
|
||||
},
|
||||
},
|
||||
},
|
||||
score::Score,
|
||||
topology::{tenant::TenantManager, HelmCommand, Topology},
|
||||
topology::{HelmCommand, Topology, tenant::TenantManager},
|
||||
};
|
||||
|
||||
#[derive(Debug, Default, Clone)]
|
||||
pub struct Monitoring {}
|
||||
|
||||
|
||||
#[async_trait]
|
||||
impl<T: Topology + HelmCommand + 'static + TenantManager> ApplicationFeature<T> for Monitoring {
|
||||
async fn ensure_installed(&self, topology: &T) -> Result<(), String> {
|
||||
|
@ -4,11 +4,14 @@ use serde_yaml::{Mapping, Value};
|
||||
|
||||
use crate::{
|
||||
interpret::{InterpretError, Outcome},
|
||||
modules::monitoring::{kube_prometheus::{
|
||||
prometheus::{KubePrometheus, KubePrometheusReceiver},
|
||||
types::{AlertChannelConfig, AlertManagerChannelConfig},
|
||||
}, prometheus::prometheus::{Prometheus, PrometheusReceiver}},
|
||||
topology::{oberservability::monitoring::AlertReceiver, Url},
|
||||
modules::monitoring::{
|
||||
kube_prometheus::{
|
||||
prometheus::{KubePrometheus, KubePrometheusReceiver},
|
||||
types::{AlertChannelConfig, AlertManagerChannelConfig},
|
||||
},
|
||||
prometheus::prometheus::{Prometheus, PrometheusReceiver},
|
||||
},
|
||||
topology::{Url, oberservability::monitoring::AlertReceiver},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
@ -4,11 +4,14 @@ use serde_yaml::{Mapping, Value};
|
||||
|
||||
use crate::{
|
||||
interpret::{InterpretError, Outcome},
|
||||
modules::monitoring::{kube_prometheus::{
|
||||
prometheus::{KubePrometheus, KubePrometheusReceiver},
|
||||
types::{AlertChannelConfig, AlertManagerChannelConfig},
|
||||
}, prometheus::prometheus::{Prometheus, PrometheusReceiver}},
|
||||
topology::{oberservability::monitoring::AlertReceiver, Url},
|
||||
modules::monitoring::{
|
||||
kube_prometheus::{
|
||||
prometheus::{KubePrometheus, KubePrometheusReceiver},
|
||||
types::{AlertChannelConfig, AlertManagerChannelConfig},
|
||||
},
|
||||
prometheus::prometheus::{Prometheus, PrometheusReceiver},
|
||||
},
|
||||
topology::{Url, oberservability::monitoring::AlertReceiver},
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
|
@ -1,3 +1 @@
|
||||
|
||||
pub mod k8s_application_monitoring_score;
|
||||
|
||||
|
@ -4,14 +4,15 @@ use std::str::FromStr;
|
||||
use crate::modules::helm::chart::HelmChartScore;
|
||||
|
||||
pub fn grafana_helm_chart_score(ns: &str) -> HelmChartScore {
|
||||
let values = format!(
|
||||
let values = format!(
|
||||
r#"
|
||||
rbac:
|
||||
namespaced: true
|
||||
sidecar:
|
||||
dashboards:
|
||||
enabled: true
|
||||
"#);
|
||||
"#
|
||||
);
|
||||
|
||||
HelmChartScore {
|
||||
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
||||
|
@ -1,2 +1 @@
|
||||
pub mod helm_grafana;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
pub mod alert_channel;
|
||||
pub mod alert_rule;
|
||||
pub mod application_monitoring;
|
||||
pub mod grafana;
|
||||
pub mod kube_prometheus;
|
||||
pub mod ntfy;
|
||||
pub mod grafana;
|
||||
pub mod prometheus;
|
||||
pub mod application_monitoring;
|
||||
|
@ -1,2 +1 @@
|
||||
pub mod prometheus_helm;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user