@@ -100,15 +100,8 @@ use kube::{runtime::reflector::ObjectRef, Resource};
100
100
use regex:: Regex ;
101
101
use schemars:: JsonSchema ;
102
102
use serde:: { Deserialize , Serialize } ;
103
- use snafu:: { OptionExt , Snafu } ;
104
103
use tracing:: instrument;
105
104
106
- #[ derive( Debug , Snafu ) ]
107
- pub enum Error {
108
- #[ snafu( display( "missing roleGroup {role_group:?}" ) ) ]
109
- MissingRoleGroup { role_group : String } ,
110
- }
111
-
112
105
#[ derive( Clone , Debug , Default , Deserialize , JsonSchema , PartialEq , Serialize ) ]
113
106
#[ serde(
114
107
rename_all = "camelCase" ,
@@ -364,30 +357,6 @@ where
364
357
. collect ( ) ,
365
358
}
366
359
}
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
- }
391
360
}
392
361
393
362
/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
@@ -519,10 +488,6 @@ mod tests {
519
488
)
520
489
. unwrap ( ) ;
521
490
522
- // let mut merged = role_group;
523
- // merged.merge(&role);
524
- // merged.merge(&operator_generated);
525
-
526
491
// Please note that merge order is different than we normally do!
527
492
// This is not trivial, as the merge operation is not purely additive (as it is with e.g.
528
493
// PodTemplateSpec).
0 commit comments