Skip to content

Commit e7051c6

Browse files
committed
refactor: remove kerberos build properties from ValidatedClusterConfig
1 parent 7d6522c commit e7051c6

4 files changed

Lines changed: 1 addition & 28 deletions

File tree

rust/operator-binary/src/controller.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,6 @@ pub struct ValidatedClusterConfig {
451451
pub hive_opa_config: Option<HiveOpaConfig>,
452452
/// The Kerberos `SecretClass` name, if Kerberos is enabled.
453453
pub kerberos_secret_class: Option<SecretClassName>,
454-
/// Kerberos-related `hive-site.xml` entries (empty when Kerberos is disabled).
455-
pub kerberos_config: BTreeMap<String, String>,
456-
/// Whether a `core-site.xml` with `hadoop.security.authentication=kerberos` is
457-
/// required (Kerberos enabled and no HDFS backend).
458-
pub needs_kerberos_core_site: bool,
459454
}
460455

461456
impl ValidatedClusterConfig {

rust/operator-binary/src/controller/build/properties/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ mod tests {
3939

4040
#[cfg(test)]
4141
pub(crate) mod test_support {
42-
use std::collections::BTreeMap;
43-
4442
use crate::{
4543
controller::{ValidatedClusterConfig, test_support::DERBY_YAML},
4644
crd::{
@@ -78,8 +76,6 @@ pub(crate) mod test_support {
7876
s3_connection_spec: None,
7977
hive_opa_config: None,
8078
kerberos_secret_class: None,
81-
kerberos_config: BTreeMap::new(),
82-
needs_kerberos_core_site: false,
8379
}
8480
}
8581
}

rust/operator-binary/src/controller/validate.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use stackable_operator::{
2222
use crate::{
2323
controller::{
2424
HiveRoleGroupConfig, RoleGroupName, ValidatedCluster, ValidatedClusterConfig,
25-
ValidatedMetaStoreConfig, ValidatedRoleConfig, build::kerberos::kerberos_config_properties,
26-
dereference::DereferencedObjects,
25+
ValidatedMetaStoreConfig, ValidatedRoleConfig, dereference::DereferencedObjects,
2726
},
2827
crd::{
2928
HiveRole, MetaStoreConfig,
@@ -228,17 +227,6 @@ pub fn validate_cluster(
228227

229228
let kerberos_secret_class = hive.kerberos_secret_class();
230229

231-
// Kerberos-related `hive-site.xml` entries (empty when Kerberos is disabled).
232-
let kerberos_config = if kerberos_secret_class.is_some() {
233-
kerberos_config_properties(name.as_ref(), namespace.as_ref(), cluster_info)
234-
} else {
235-
BTreeMap::new()
236-
};
237-
238-
// A `core-site.xml` with `hadoop.security.authentication=kerberos` is required when
239-
// Kerberos is enabled and there is no HDFS backend (i.e. S3).
240-
let needs_kerberos_core_site = kerberos_secret_class.is_some() && hdfs.is_none();
241-
242230
Ok(ValidatedCluster::new(
243231
name,
244232
namespace,
@@ -253,8 +241,6 @@ pub fn validate_cluster(
253241
s3_connection_spec: dereferenced_objects.s3_connection_spec,
254242
hive_opa_config: dereferenced_objects.hive_opa_config,
255243
kerberos_secret_class,
256-
kerberos_config,
257-
needs_kerberos_core_site,
258244
},
259245
role_group_configs,
260246
))

rust/operator-binary/src/crd/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,6 @@ impl v1alpha1::HiveCluster {
221221
}
222222
}
223223

224-
pub fn has_kerberos_enabled(&self) -> bool {
225-
self.kerberos_secret_class().is_some()
226-
}
227-
228224
pub fn kerberos_secret_class(&self) -> Option<SecretClassName> {
229225
self.spec
230226
.cluster_config

0 commit comments

Comments
 (0)