forked from NationTech/harmony
31 lines
801 B
Rust
31 lines
801 B
Rust
use std::str::FromStr;
|
|
|
|
use harmony::modules::helm::chart::{HelmChartScore, NonBlankString};
|
|
use url::Url;
|
|
|
|
pub fn prometheus_msteams_score(
|
|
name: String,
|
|
webhook_url: Url,
|
|
namespace: String,
|
|
) -> HelmChartScore {
|
|
let values = format!(
|
|
r#"
|
|
connectors:
|
|
- default: "{webhook_url}"
|
|
"#,
|
|
);
|
|
|
|
HelmChartScore {
|
|
namespace: Some(NonBlankString::from_str(&namespace).unwrap()),
|
|
release_name: NonBlankString::from_str(&name).unwrap(),
|
|
chart_name: NonBlankString::from_str("oci://hub.nationtech.io/library/prometheus-msteams")
|
|
.unwrap(),
|
|
chart_version: None,
|
|
values_overrides: None,
|
|
values_yaml: Some(values.to_string()),
|
|
create_namespace: true,
|
|
install_only: true,
|
|
repository: None,
|
|
}
|
|
}
|