fix: try to properly append YAML in correct places in argoapplication #80
| @ -3,7 +3,6 @@ use serde::Serialize; | ||||
| 
 | ||||
| use crate::topology::Topology; | ||||
| 
 | ||||
| use super::Application; | ||||
| /// An ApplicationFeature provided by harmony, such as Backups, Monitoring, MultisiteAvailability,
 | ||||
| /// ContinuousIntegration, ContinuousDelivery
 | ||||
| #[async_trait] | ||||
|  | ||||
| @ -3,8 +3,7 @@ use std::{backtrace, collections::HashMap}; | ||||
| use k8s_openapi::{Metadata, NamespaceResourceScope, Resource}; | ||||
| use log::debug; | ||||
| use serde::Serialize; | ||||
| use serde_json::map::ValuesMut; | ||||
| use serde_yaml::{Mapping, Value}; | ||||
| use serde_yaml::Value; | ||||
| use url::Url; | ||||
| 
 | ||||
| use crate::modules::application::features::CDApplicationConfig; | ||||
| @ -187,7 +186,7 @@ impl ArgoApplication { | ||||
|         let project = &self.project; | ||||
|         let source = &self.source; | ||||
| 
 | ||||
|         let mut yaml_str = format!( | ||||
|         let yaml_str = format!( | ||||
|             r#" | ||||
| apiVersion: argoproj.io/v1alpha1 | ||||
| kind: Application | ||||
| @ -214,7 +213,7 @@ spec: | ||||
|         let mut yaml_value: Value = | ||||
|             serde_yaml::from_str(yaml_str.as_str()).expect("couldn't parse string to YAML"); | ||||
| 
 | ||||
|         let mut spec = yaml_value | ||||
|         let spec = yaml_value | ||||
|             .get_mut("spec") | ||||
|             .expect("couldn't get spec from yaml") | ||||
|             .as_mapping_mut() | ||||
|  | ||||
| @ -2,7 +2,7 @@ use async_trait::async_trait; | ||||
| use log::info; | ||||
| 
 | ||||
| use crate::{ | ||||
|     modules::application::{Application, ApplicationFeature}, | ||||
|     modules::application::ApplicationFeature, | ||||
|     topology::{K8sclient, Topology}, | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -2,7 +2,7 @@ use async_trait::async_trait; | ||||
| use log::info; | ||||
| 
 | ||||
| use crate::{ | ||||
|     modules::application::{Application, ApplicationFeature}, | ||||
|     modules::application::ApplicationFeature, | ||||
|     topology::{HelmCommand, Topology}, | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -10,7 +10,7 @@ use crate::{ | ||||
|     modules::monitoring::alert_rule::prometheus_alert_rule::AlertManagerRuleGroup, | ||||
|     score, | ||||
|     topology::{ | ||||
|         HelmCommand, K8sAnywhereTopology, Topology, | ||||
|         HelmCommand, Topology, | ||||
|         installable::Installable, | ||||
|         oberservability::monitoring::{AlertReceiver, AlertRule, AlertSender}, | ||||
|         tenant::TenantManager, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user