Merge pull request 'feat/basicCI' (#42) from feat/basicCI into master
All checks were successful
Run Check Script / check (push) Successful in 1m50s
All checks were successful
Run Check Script / check (push) Successful in 1m50s
Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/42 Reviewed-by: taha <taha@noreply.git.nationtech.io>
This commit is contained in:
commit
88d6af9815
14
.gitea/workflows/check.yml
Normal file
14
.gitea/workflows/check.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Run Check Script
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: rust-cargo
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Run check script
|
||||||
|
run: bash check.sh
|
@ -4,9 +4,7 @@ use harmony::{
|
|||||||
maestro::Maestro,
|
maestro::Maestro,
|
||||||
modules::{
|
modules::{
|
||||||
lamp::{LAMPConfig, LAMPScore},
|
lamp::{LAMPConfig, LAMPScore},
|
||||||
monitoring::monitoring_alerting::{
|
monitoring::monitoring_alerting::{AlertChannel, MonitoringAlertingStackScore},
|
||||||
AlertChannel, MonitoringAlertingStackScore, WebhookServiceType,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
topology::{K8sAnywhereTopology, Url},
|
topology::{K8sAnywhereTopology, Url},
|
||||||
};
|
};
|
||||||
@ -50,10 +48,6 @@ async fn main() {
|
|||||||
|
|
||||||
let mut monitoring_stack_score = MonitoringAlertingStackScore::new();
|
let mut monitoring_stack_score = MonitoringAlertingStackScore::new();
|
||||||
monitoring_stack_score.namespace = Some(lamp_stack.config.namespace.clone());
|
monitoring_stack_score.namespace = Some(lamp_stack.config.namespace.clone());
|
||||||
monitoring_stack_score.alert_channel = Some(AlertChannel::WebHookUrl {
|
|
||||||
url: url,
|
|
||||||
webhook_service_type: WebhookServiceType::Discord,
|
|
||||||
});
|
|
||||||
|
|
||||||
maestro.register_all(vec![Box::new(lamp_stack), Box::new(monitoring_stack_score)]);
|
maestro.register_all(vec![Box::new(lamp_stack), Box::new(monitoring_stack_score)]);
|
||||||
// Here we bootstrap the CLI, this gives some nice features if you need them
|
// Here we bootstrap the CLI, this gives some nice features if you need them
|
||||||
|
@ -2,7 +2,6 @@ use serde::Serialize;
|
|||||||
|
|
||||||
use super::monitoring_alerting::AlertChannel;
|
use super::monitoring_alerting::AlertChannel;
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
pub struct KubePrometheusConfig {
|
pub struct KubePrometheusConfig {
|
||||||
pub namespace: String,
|
pub namespace: String,
|
||||||
|
@ -26,8 +26,10 @@ environment:
|
|||||||
Some(HelmChartScore {
|
Some(HelmChartScore {
|
||||||
namespace: Some(NonBlankString::from_str(&config.namespace).unwrap()),
|
namespace: Some(NonBlankString::from_str(&config.namespace).unwrap()),
|
||||||
release_name: NonBlankString::from_str(&name).unwrap(),
|
release_name: NonBlankString::from_str(&name).unwrap(),
|
||||||
chart_name: NonBlankString::from_str("oci://hub.nationtech.io/library/alertmanager-discord")
|
chart_name: NonBlankString::from_str(
|
||||||
.unwrap(),
|
"oci://hub.nationtech.io/library/alertmanager-discord",
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
chart_version: None,
|
chart_version: None,
|
||||||
values_overrides: None,
|
values_overrides: None,
|
||||||
values_yaml: Some(values.to_string()),
|
values_yaml: Some(values.to_string()),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
mod config;
|
||||||
|
mod discord_alert_manager;
|
||||||
mod kube_prometheus;
|
mod kube_prometheus;
|
||||||
pub mod monitoring_alerting;
|
pub mod monitoring_alerting;
|
||||||
mod discord_alert_manager;
|
|
||||||
mod config;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user