@@ -2,7 +2,7 @@ use futures::{StreamExt as _, TryStreamExt};
22use indexmap:: IndexMap ;
33use reqwest:: StatusCode ;
44use serde:: { Deserialize , Serialize } ;
5- use serde_yaml:: { Mapping , Value } ;
5+ use serde_yaml:: Mapping ;
66use snafu:: { ResultExt , Snafu } ;
77use tokio:: task:: JoinError ;
88use tracing:: { Instrument , Span , debug, info, instrument} ;
@@ -19,7 +19,7 @@ use crate::{
1919 utils:: {
2020 k8s:: { self , Client } ,
2121 path:: { IntoPathOrUrl as _, PathOrUrlParseError } ,
22- yaml:: deep_merge ,
22+ yaml:: merged_values_for_operator ,
2323 } ,
2424 xfer:: { self , processor:: Text } ,
2525} ;
@@ -104,24 +104,14 @@ impl ReleaseSpec {
104104 Span :: current ( ) . pb_set_length ( operators. len ( ) as u64 ) ;
105105
106106 let namespace = namespace. to_string ( ) ;
107- let common_values = operator_values
108- . get ( "common" )
109- . and_then ( Value :: as_mapping)
110- . cloned ( )
111- . unwrap_or_default ( ) ;
112107 futures:: stream:: iter ( operators)
113108 . map ( |( product_name, product) | {
114109 let task_span =
115110 tracing:: info_span!( "install_operator" , product_name = tracing:: field:: Empty ) ;
116111
117112 let namespace = namespace. clone ( ) ;
118113 let chart_source = chart_source. clone ( ) ;
119- let operator_specific = operator_values
120- . get ( format ! ( "{product_name}-operator" ) )
121- . and_then ( Value :: as_mapping)
122- . cloned ( )
123- . unwrap_or_default ( ) ;
124- let merged_values = deep_merge ( common_values. clone ( ) , operator_specific) ;
114+ let merged_values = merged_values_for_operator ( operator_values, & product_name) ;
125115 // Helm installs currently `block_in_place`, so we need to spawn each job onto a separate task to
126116 // get useful parallelism.
127117 tokio:: spawn (
0 commit comments