@@ -100,15 +100,8 @@ use kube::{runtime::reflector::ObjectRef, Resource};
100100use regex:: Regex ;
101101use schemars:: JsonSchema ;
102102use serde:: { Deserialize , Serialize } ;
103- use snafu:: { OptionExt , Snafu } ;
104103use tracing:: instrument;
105104
106- #[ derive( Debug , Snafu ) ]
107- pub enum Error {
108- #[ snafu( display( "missing roleGroup {role_group:?}" ) ) ]
109- MissingRoleGroup { role_group : String } ,
110- }
111-
112105#[ derive( Clone , Debug , Default , Deserialize , JsonSchema , PartialEq , Serialize ) ]
113106#[ serde(
114107 rename_all = "camelCase" ,
@@ -364,30 +357,6 @@ where
364357 . collect ( ) ,
365358 }
366359 }
367-
368- /// Returns the product specific common config from
369- /// 1. The role
370- /// 2. The role group
371- pub fn merged_product_specific_common_configs < ' a > (
372- & ' a self ,
373- role_group : & str ,
374- ) -> Result <
375- (
376- & ' a ProductSpecificCommonConfig ,
377- & ' a ProductSpecificCommonConfig ,
378- ) ,
379- Error ,
380- > {
381- let from_role = & self . config . product_specific_common_config ;
382- let from_role_group = & self
383- . role_groups
384- . get ( role_group)
385- . with_context ( || MissingRoleGroupSnafu { role_group } ) ?
386- . config
387- . product_specific_common_config ;
388-
389- Ok ( ( from_role, from_role_group) )
390- }
391360}
392361
393362/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
@@ -519,10 +488,6 @@ mod tests {
519488 )
520489 . unwrap ( ) ;
521490
522- // let mut merged = role_group;
523- // merged.merge(&role);
524- // merged.merge(&operator_generated);
525-
526491 // Please note that merge order is different than we normally do!
527492 // This is not trivial, as the merge operation is not purely additive (as it is with e.g.
528493 // PodTemplateSpec).
0 commit comments