@@ -22,6 +22,17 @@ pub mod build;
2222pub mod dereference;
2323pub mod validate;
2424
25+ /// The local-`framework` [`RoleGroupConfig`](crate::framework::role_utils::RoleGroupConfig)
26+ /// specialised for HDFS: the validated config is the per-role [`AnyNodeConfig`],
27+ /// the product-specific common config is [`JavaCommonConfig`] (whose JVM-argument
28+ /// merge is fallible, hence the vendored framework variant), and the config
29+ /// overrides are [`v1alpha1::HdfsConfigOverrides`].
30+ pub type ValidatedRoleGroupConfig = crate :: framework:: role_utils:: RoleGroupConfig <
31+ AnyNodeConfig ,
32+ stackable_operator:: role_utils:: JavaCommonConfig ,
33+ v1alpha1:: HdfsConfigOverrides ,
34+ > ;
35+
2536/// The validated cluster: proves that config merging and validation succeeded
2637/// for every role and role group before any resources are created. Placed in the
2738/// controller so that subsequent steps that reference this struct only depend on
@@ -175,12 +186,13 @@ impl Resource for ValidatedCluster {
175186/// longer need the raw `HdfsCluster` to render config.
176187#[ derive( Clone , Debug ) ]
177188pub struct ValidatedClusterConfig {
178- pub dfs_replication : u8 ,
179189 /// The authentication config, if configured. Its presence enables both Kerberos
180190 /// and HTTPS; it also carries the TLS and Kerberos secret class names.
181191 pub authentication : Option < AuthenticationConfig > ,
182192 /// The resolved OPA authorization config, if authorization is configured.
183193 pub authorization : Option < HdfsOpaConfig > ,
194+ /// The replication factor.
195+ pub dfs_replication : u8 ,
184196 pub rack_awareness : Option < String > ,
185197}
186198
@@ -190,9 +202,9 @@ impl ValidatedClusterConfig {
190202 authorization : Option < HdfsOpaConfig > ,
191203 ) -> ValidatedClusterConfig {
192204 ValidatedClusterConfig {
193- dfs_replication : hdfs. spec . cluster_config . dfs_replication ,
194205 authentication : hdfs. authentication_config ( ) . cloned ( ) ,
195206 authorization,
207+ dfs_replication : hdfs. spec . cluster_config . dfs_replication ,
196208 rack_awareness : hdfs. rackawareness_config ( ) ,
197209 }
198210 }
@@ -203,20 +215,3 @@ impl ValidatedClusterConfig {
203215pub struct ValidatedRoleConfig {
204216 pub pdb : stackable_operator:: commons:: pdb:: PdbConfig ,
205217}
206-
207- /// Per-rolegroup configuration: the merged CRD config plus the merged
208- /// (role <- role group) `configOverrides`, `envOverrides`, `cliOverrides` and
209- /// `podOverrides`.
210- ///
211- /// This is the local-`framework` [`RoleGroupConfig`](crate::framework::role_utils::RoleGroupConfig)
212- /// specialised for HDFS: the validated config is the per-role [`AnyNodeConfig`],
213- /// the product-specific common config is [`JavaCommonConfig`] (whose JVM-argument
214- /// merge is fallible, hence the vendored framework variant), and the config
215- /// overrides are [`v1alpha1::HdfsConfigOverrides`]. The `replicas` field is used
216- /// to derive the per-pod [`HdfsPodRef`]s via [`ValidatedCluster::pod_refs`] and
217- /// `env_overrides` is the typed [`EnvVarSet`](stackable_operator::v2::builder::pod::container::EnvVarSet).
218- pub type ValidatedRoleGroupConfig = crate :: framework:: role_utils:: RoleGroupConfig <
219- AnyNodeConfig ,
220- stackable_operator:: role_utils:: JavaCommonConfig ,
221- v1alpha1:: HdfsConfigOverrides ,
222- > ;
0 commit comments