clean up usage of serde_yaml
This commit is contained in:
@@ -9,6 +9,5 @@ license.workspace = true
|
||||
harmony = { version = "0.1.0", path = "../../harmony" }
|
||||
harmony_cli = { version = "0.1.0", path = "../../harmony_cli" }
|
||||
harmony_macros = { version = "0.1.0", path = "../../harmony_macros" }
|
||||
serde_yaml.workspace = true
|
||||
tokio.workspace = true
|
||||
url.workspace = true
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use harmony::{
|
||||
inventory::Inventory,
|
||||
maestro::Maestro,
|
||||
@@ -56,15 +58,14 @@ async fn main() {
|
||||
relabelings: vec![],
|
||||
};
|
||||
|
||||
let mut selector = Mapping::new();
|
||||
let mut selector = HashMap::new();
|
||||
selector.insert(
|
||||
Value::from("matchExpressions"),
|
||||
serde_yaml::to_value(vec![Selector {
|
||||
"matchExpressions".to_string(),
|
||||
vec![Selector {
|
||||
key: "monitored".to_string(),
|
||||
operator: "In".to_string(),
|
||||
values: vec!["test-service-1".to_string()],
|
||||
}])
|
||||
.expect("couldn't create mapping value"),
|
||||
}],
|
||||
);
|
||||
|
||||
let service_monitor = ServiceMonitor {
|
||||
|
||||
Reference in New Issue
Block a user