Skip to content

Commit 644d87e

Browse files
committed
chore: address review comments
1 parent 844dfa5 commit 644d87e

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ All notable changes to this project will be documented in this file.
66

77
### Changed
88

9+
- BREAKING: `configOverrides` now only accepts the supported config file names `hive-site.xml` and `security.properties`. Previously arbitrary keys were silently accepted but ignored ([#695]).
910
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#693]).
1011
- Bump `stackable-operator` to 0.110.0 and `kube` to 3.1.0 ([#695]).
11-
- Replace untyped config overrides with typed `HiveConfigOverrides` for `hive-site.xml` and `security.properties`.
12-
- Require explicit `SecretClassVolumeProvisionParts` when provisioning secret volumes.
1312

1413
[#693]: https://github.com/stackabletech/hive-operator/pull/693
1514
[#695]: https://github.com/stackabletech/hive-operator/pull/695

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl KeyValueOverridesProvider for HiveConfigOverrides {
6262
fn get_key_value_overrides(&self, file: &str) -> BTreeMap<String, Option<String>> {
6363
match file {
6464
HIVE_SITE_XML => self
65-
.hive_site
65+
.hive_site_xml
6666
.as_ref()
6767
.map(KeyValueConfigOverrides::as_product_config_overrides)
6868
.unwrap_or_default(),
@@ -76,15 +76,6 @@ impl KeyValueOverridesProvider for HiveConfigOverrides {
7676
}
7777
}
7878

79-
pub type HiveRoleType = Role<
80-
MetaStoreConfigFragment,
81-
HiveConfigOverrides,
82-
v1alpha1::HiveMetastoreRoleConfig,
83-
JavaCommonConfig,
84-
>;
85-
86-
pub type HiveRoleGroupType = RoleGroup<MetaStoreConfigFragment, JavaCommonConfig, HiveConfigOverrides>;
87-
8879
pub const FIELD_MANAGER: &str = "hive-operator";
8980
pub const APP_NAME: &str = "hive";
9081

@@ -122,6 +113,16 @@ pub const DB_PASSWORD_ENV: &str = "DB_PASSWORD_ENV";
122113

123114
const DEFAULT_METASTORE_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5);
124115

116+
pub type HiveRoleType = Role<
117+
MetaStoreConfigFragment,
118+
HiveConfigOverrides,
119+
v1alpha1::HiveMetastoreRoleConfig,
120+
JavaCommonConfig,
121+
>;
122+
123+
pub type HiveRoleGroupType =
124+
RoleGroup<MetaStoreConfigFragment, JavaCommonConfig, HiveConfigOverrides>;
125+
125126
#[derive(Snafu, Debug)]
126127
pub enum Error {
127128
#[snafu(display("no metastore role configuration provided"))]
@@ -284,11 +285,7 @@ impl v1alpha1::HiveCluster {
284285
}))
285286
}
286287

287-
pub fn role(
288-
&self,
289-
role_variant: &HiveRole,
290-
) -> Result<&HiveRoleType, Error>
291-
{
288+
pub fn role(&self, role_variant: &HiveRole) -> Result<&HiveRoleType, Error> {
292289
match role_variant {
293290
HiveRole::MetaStore => self.spec.metastore.as_ref(),
294291
}

0 commit comments

Comments
 (0)