File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ pub fn build_rolegroup_config_map(
7171
7272 let hbase_site_xml = hbase_site:: build (
7373 role,
74- & rg. merged_config ,
74+ & rg. config ,
7575 cluster_config
7676 . zookeeper_connection_information
7777 . as_hbase_settings ( ) ,
@@ -81,7 +81,7 @@ pub fn build_rolegroup_config_map(
8181 ) ;
8282
8383 let hbase_env_sh = hbase_env:: build (
84- & rg. merged_config ,
84+ & rg. config ,
8585 role,
8686 cluster_config. kerberos_enabled ,
8787 rg. non_heap_jvm_args . clone ( ) ,
@@ -134,12 +134,10 @@ pub fn build_rolegroup_config_map(
134134 builder. add_data ( ConfigFileName :: SslClient . to_string ( ) , ssl_client_xml) ;
135135 }
136136
137- if let Some ( log4j2_properties) = logging:: build_log4j2 ( rg. merged_config . logging ( ) ) {
137+ if let Some ( log4j2_properties) = logging:: build_log4j2 ( rg. config . logging ( ) ) {
138138 builder. add_data ( ConfigFileName :: Log4j2 . to_string ( ) , log4j2_properties) ;
139139 }
140- if let Some ( vector_config) =
141- logging:: build_vector_config ( rolegroup_ref, rg. merged_config . logging ( ) )
142- {
140+ if let Some ( vector_config) = logging:: build_vector_config ( rolegroup_ref, rg. config . logging ( ) ) {
143141 builder. add_data ( VECTOR_CONFIG_FILE , vector_config) ;
144142 }
145143
Original file line number Diff line number Diff line change @@ -150,13 +150,17 @@ pub struct ValidatedRoleConfig {
150150/// Per-rolegroup configuration: the merged CRD config plus the merged
151151/// (role <- role group) `configOverrides`, `envOverrides` and `podOverrides`.
152152///
153- /// This carries every override channel so that the build step is a pure function of
154- /// [`ValidatedCluster`] and never has to reach back into the raw `HbaseCluster`.
153+ /// The merge and validation is performed by
154+ /// [`with_validated_config`](crate::framework::role_utils::with_validated_config); the
155+ /// result is flattened into this struct and augmented with the pre-resolved
156+ /// `non_heap_jvm_args`. Carrying every override channel (and the JVM args) keeps the
157+ /// build step a pure function of [`ValidatedCluster`] that never has to reach back into
158+ /// the raw `HbaseCluster`.
155159#[ derive( Clone , Debug ) ]
156160pub struct ValidatedRoleGroupConfig {
157- /// The desired number of replicas (`None` lets Kubernetes default to 1).
158- pub replicas : Option < u16 > ,
159- pub merged_config : AnyServiceConfig ,
161+ /// The desired number of replicas (defaulted to 1 during validation ).
162+ pub replicas : u16 ,
163+ pub config : AnyServiceConfig ,
160164 pub config_overrides : v1alpha1:: HbaseConfigOverrides ,
161165 pub env_overrides : EnvVarSet ,
162166 /// Merged (role <- role group) pod template overrides.
You can’t perform that action at this time.
0 commit comments