Monitor an application within a tenant #86

Merged
letian merged 22 commits from feat/crd-alertmanager-configs into master 2025-08-04 21:42:05 +00:00
2 changed files with 5 additions and 4 deletions
Showing only changes of commit e078f5c062 - Show all commits

View File

@ -250,6 +250,7 @@ impl K8sAnywhereTopology {
self.tenant_manager
.get_or_try_init(async || -> Result<K8sTenantManager, String> {
// TOOD: checker si K8s ou K3d/s tenant manager (ref. issue https://git.nationtech.io/NationTech/harmony/issues/94)
let k8s_client = self.k8s_client().await?;
Ok(K8sTenantManager::new(k8s_client))
})

View File

@ -261,8 +261,8 @@ impl K8sPrometheusCRDAlertingInterpret {
let prom_spec = PrometheusSpec {
alerting: Some(PrometheusSpecAlerting {
alertmanagers: Some(vec![AlertmanagerEndpoints {
name: Some(format!("alertmanager-operated")),
namespace: Some(format!("{}", self.sender.namespace.clone())),
name: Some("alertmanager-operated".into()),
namespace: Some(self.sender.namespace.clone()),
port: Some("web".into()),
scheme: Some("http".into()),
}]),
@ -271,7 +271,7 @@ impl K8sPrometheusCRDAlertingInterpret {
service_monitor_namespace_selector: Some(LabelSelector {
match_labels: BTreeMap::from([(
"kubernetes.io/metadata.name".to_string(),
format!("{}", self.sender.namespace.clone()),
self.sender.namespace.clone(),
)]),
match_expressions: vec![],
}),
@ -295,7 +295,7 @@ impl K8sPrometheusCRDAlertingInterpret {
rule_namespace_selector: Some(LabelSelector {
match_labels: BTreeMap::from([(
"kubernetes.io/metadata.name".to_string(),
format!("{}", self.sender.namespace.clone()),
self.sender.namespace.clone(),
)]),
match_expressions: vec![],
}),