Skip to content

Commit 72671a1

Browse files
committed
docs: consolidate v2 / upstream refs
1 parent 20e3ee5 commit 72671a1

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ pub mod user_info_fetcher;
66

77
/// The names of the config files assembled into the rolegroup `ConfigMap`.
88
///
9-
/// The Vector config file is intentionally not listed here; like in hdfs it is added via the
10-
/// `stackable_operator::product_logging::framework::VECTOR_CONFIG_FILE` constant.
9+
/// The Vector config file is intentionally not listed here; it is added separately via the
10+
/// `VECTOR_CONFIG_FILE` constant.
1111
#[derive(Clone, Copy, Debug, strum::Display)]
1212
pub enum ConfigFileName {
1313
#[strum(serialize = "config.json")]

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ pub fn validate(
142142
opa: &v1alpha2::OpaCluster,
143143
operator_environment: &OperatorEnvironmentOptions,
144144
) -> Result<ValidatedCluster> {
145-
// Wrap the metadata in fail-safe v2 types so the build steps never have to re-check it.
146145
let name = get_cluster_name(opa).context(GetClusterNameSnafu)?;
147146
let namespace = get_namespace(opa).context(GetNamespaceSnafu)?;
148147
let uid = get_uid(opa).context(GetUidSnafu)?;
@@ -182,8 +181,8 @@ pub fn validate(
182181
},
183182
)?;
184183

185-
// The framework keeps `envOverrides` as a `HashMap<String, String>`; lift it into the
186-
// type-safe `EnvVarSet` consumed by the build step.
184+
// `envOverrides` is kept as a `HashMap<String, String>`; lift it into the type-safe
185+
// `EnvVarSet` consumed by the build step.
187186
let mut env_overrides = EnvVarSet::new();
188187
for (name, value) in merged.config.env_overrides {
189188
env_overrides = env_overrides.with_value(
@@ -200,8 +199,8 @@ pub fn validate(
200199
&vector_aggregator_config_map_name,
201200
)?;
202201

203-
// Validate the role group name against the upstream `RoleGroupName` newtype (RFC 1123
204-
// label, length-bounded) so the typed key is guaranteed to produce valid resource names.
202+
// Validate the role group name against the `RoleGroupName` newtype (RFC 1123 label,
203+
// length-bounded) so the typed key is guaranteed to produce valid resource names.
205204
let role_group_name =
206205
RoleGroupName::from_str(role_group_name).context(ParseRoleGroupNameSnafu {
207206
role_group: role_group_name.clone(),
@@ -210,7 +209,7 @@ pub fn validate(
210209
group_configs.insert(
211210
role_group_name,
212211
OpaRoleGroupConfig {
213-
// Unused for a DaemonSet, but the framework type requires it.
212+
// Unused for a DaemonSet, but the `RoleGroupConfig` type requires it.
214213
replicas: merged.replicas,
215214
config: ValidatedOpaConfig::from_merged(merged.config.config, logging),
216215
config_overrides: merged.config.config_overrides,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ pub const DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_mi
3737
/// Safety puffer to guarantee the graceful shutdown works every time.
3838
pub const SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD: Duration = Duration::from_secs(5);
3939

40-
// The 4th generic (`CommonConfig`) is the v2 `GenericCommonConfig`, which implements `Merge`.
41-
// This lets us merge role groups via the upstream `v2::role_utils::with_validated_config`.
4240
pub type OpaRoleType =
4341
Role<OpaConfigFragment, OpaConfigOverrides, EmptyRoleConfig, GenericCommonConfig>;
4442

rust/operator-binary/src/opa_controller.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ pub async fn reconcile_opa(
164164

165165
let client = &ctx.client;
166166

167-
// NOTE(@maltesander): There currently is no dereference (client required) step for OPA.
168-
// validate (no client required)
169167
let validated_cluster =
170168
validate::validate(opa, &ctx.operator_environment).context(ValidateClusterSnafu)?;
171169

0 commit comments

Comments
 (0)