1- use std:: {
2- borrow:: Cow ,
3- collections:: { BTreeMap , HashMap } ,
4- } ;
1+ use std:: { borrow:: Cow , collections:: BTreeMap } ;
52
63use product_config:: { ProductConfigManager , types:: PropertyNameKind } ;
74use snafu:: { OptionExt , ResultExt , Snafu } ;
@@ -12,9 +9,12 @@ use stackable_operator::{
129} ;
1310
1411use crate :: {
15- controller:: { CONTAINER_IMAGE_BASE_NAME , ValidatedCluster , dereference:: DereferencedObjects } ,
12+ controller:: {
13+ CONTAINER_IMAGE_BASE_NAME , ValidatedCluster , ValidatedRoleConfig , ValidatedRoleGroupConfig ,
14+ dereference:: DereferencedObjects ,
15+ } ,
1616 crd:: {
17- HIVE_SITE_XML , HiveRole , JVM_SECURITY_PROPERTIES_FILE , MetaStoreConfig ,
17+ HIVE_SITE_XML , HiveRole , JVM_SECURITY_PROPERTIES_FILE ,
1818 v1alpha1:: { self , HiveMetastoreRoleConfig } ,
1919 } ,
2020} ;
@@ -48,20 +48,6 @@ pub enum Error {
4848 } ,
4949}
5050
51- /// Per-role configuration extracted during validation.
52- #[ derive( Clone , Debug ) ]
53- pub struct ValidatedRoleConfig {
54- pub pdb : stackable_operator:: commons:: pdb:: PdbConfig ,
55- pub listener_class : String ,
56- }
57-
58- /// Per-rolegroup configuration: the merged CRD config plus the product-config properties.
59- #[ derive( Clone , Debug ) ]
60- pub struct ValidatedRoleGroupConfig {
61- pub merged_config : MetaStoreConfig ,
62- pub product_config_properties : HashMap < PropertyNameKind , BTreeMap < String , String > > ,
63- }
64-
6551pub fn validate_cluster (
6652 hive : & v1alpha1:: HiveCluster ,
6753 image_repository : & str ,
0 commit comments