feat: remove product config#976
Conversation
…s writer Patches operator-rs to the smooth-operator branch (matching trino/hdfs) as the foundation for the v2 config_overrides adoption later in this series, and vendors the Java-properties writer into config/writer (backed by the java-properties crate, Apache-2.0) so ConfigMap rendering no longer goes through product_config::writer. Repointed resource/configmap.rs. No behaviour change (18 tests pass). Regenerated Cargo.nix/crate-hashes.json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Splits server_properties_file into
controller/build/properties/{broker,controller}_properties builders (base map +
security settings + graceful-shutdown + user overrides), wired into
resource/configmap.rs by role. The property assembly was moved verbatim, so the
rendered broker.properties/controller.properties are unchanged (18 tests pass;
byte parity to be confirmed via the kuttl ConfigMap snapshot). Override input
stays BTreeMap<String,String>; no product-config removed yet (later increment).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…_map Relocates build_rolegroup_config_map (plus the jaas_config_file helper and its Error enum) from resource/configmap.rs to controller/build/config_map.rs, colocating the ConfigMap assembler with the per-file property builders and matching the controller/build/config_map.rs layout in hdfs/airflow. Pure move + repointed caller; no behaviour change (18 tests pass). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…alidate Replaces the product-config validation path with a ValidatedKafkaCluster that carries, per role group, the merged config plus the config-file, jvm-security, and env overrides resolved directly from the CRD (role <- role-group). Overrides now use stackable_operator::v2::config_overrides::KeyValueConfigOverrides (matching trino/hdfs); the v1 KeyValueOverridesProvider impls and the per-role Configuration impls are removed, and KAFKA_CLUSTER_ID injection moves into the override merge (collect_*_role_group_overrides). The dereferenced authorization config is folded into the validated cluster. Drops the product-config crate dependency (it remains transitive via stackable-operator). The CRD gains `nullable: true` on configOverrides values (v2 allows null to delete a key). Rendered .properties and env vars are unchanged (18 tests pass; byte parity to be confirmed via kuttl). Regenerated extra/crds.yaml and Cargo.nix. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ngelog Removes the --product-config section from the commandline reference and the PRODUCT_CONFIG section from the environment-variables reference (the flag/var is now a no-op via the shared RunArguments), reduces the product-config properties.yaml files to an empty shell (retained pending a later Helm config refactor), and notes the product-config removal in the changelog. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the vendored Java-properties writer (rust/operator-binary/src/config/writer.rs) with stackable_operator::v2::config_file_writer (moved there via operator-rs #1217 on the smooth-operator branch). Kafka's copy was the java-only subset of the canonical hdfs writer; the upstream module's additional to_hadoop_xml simply goes unimported. Drop the now-unused java-properties dependency. No behaviour change; rendered .properties output is byte-identical by construction (same code, new home). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…> ValidatedKafkaSecurity
Co-authored-by: maltesander <malte.sander.it@gmail.com>
|
…ogging/vector.yaml Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>
| pub role_group_configs: BTreeMap<KafkaRole, BTreeMap<RoleGroupName, ValidatedRoleGroupConfig>>, | ||
| } | ||
|
|
||
| impl ValidatedCluster { |
There was a problem hiding this comment.
The implementation of ValidatedCluster has not clear scope.
It also contains helper functions for the build step, e.g. unversioned_recommended_labels. But it should only contain functions which provide different views on the validated cluster properties.
There was a problem hiding this comment.
Elsewhere we have kept the functions but moved them out of validate: I'll do the same thing here.
There was a problem hiding this comment.
I've moved the most obvious candidate - label building - out into its own module: 9513480
| .context(AddKerberosConfigSnafu)?; | ||
| } | ||
|
|
||
| let mut env = Vec::<EnvVar>::from(validated_rg.env_overrides.clone()); |
There was a problem hiding this comment.
The creation of environment variables was already a mess in the main branch. It is different here, but not better. We start with the env_overrides and append the ones defined by the operator.
There was a problem hiding this comment.
Good catch, as this was broken in main as well (first, user overrides, then operator-supplied envs). Fixed here: 547a22f
There was a problem hiding this comment.
(that's probably why the feature tests did not catch it)
6db6ed1 to
449420b
Compare
|
Feature tests (main vs. this PR):
🟠 Deltas:
|
Removed the product-config based configuration validation.
Config and environment overrides are now merged directly from the CRD into the validated cluster.
The Java-properties writer is vendored locally, and the
product-configcrate dependency is dropped.The
--product-configCLI flag is now a no-op.Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker