@@ -6,15 +6,17 @@ use std::{
66use product_config:: { ProductConfigManager , types:: PropertyNameKind } ;
77use snafu:: { OptionExt , ResultExt , Snafu } ;
88use stackable_operator:: {
9- commons:: product_image_selection:: { self , ResolvedProductImage } ,
10- database_connections:: drivers:: jdbc:: JdbcDatabaseConnectionDetails ,
9+ commons:: product_image_selection,
1110 product_config_utils:: { transform_all_roles_to_config, validate_all_roles_and_groups_config} ,
1211 role_utils:: GenericRoleConfig ,
1312} ;
1413
15- use crate :: crd:: {
16- HIVE_SITE_XML , HiveRole , JVM_SECURITY_PROPERTIES_FILE , MetaStoreConfig ,
17- v1alpha1:: { self , HiveMetastoreRoleConfig } ,
14+ use crate :: {
15+ controller:: ValidatedHiveCluster ,
16+ crd:: {
17+ HIVE_SITE_XML , HiveRole , JVM_SECURITY_PROPERTIES_FILE , MetaStoreConfig ,
18+ v1alpha1:: { self , HiveMetastoreRoleConfig } ,
19+ } ,
1820} ;
1921
2022#[ derive( Snafu , Debug ) ]
@@ -60,15 +62,6 @@ pub struct ValidatedRoleGroupConfig {
6062 pub product_config_properties : HashMap < PropertyNameKind , BTreeMap < String , String > > ,
6163}
6264
63- /// The validated cluster: proves that product-config validation and config merging
64- /// succeeded for every role and role group before any resources are created.
65- pub struct ValidatedHiveCluster {
66- pub image : ResolvedProductImage ,
67- pub role_groups : BTreeMap < String , ValidatedRoleGroupConfig > ,
68- pub role_config : Option < ValidatedRoleConfig > ,
69- pub metadata_database_connection_details : JdbcDatabaseConnectionDetails ,
70- }
71-
7265pub fn validate_cluster (
7366 hive : & v1alpha1:: HiveCluster ,
7467 image_base_name : & str ,
0 commit comments