Skip to content

refactor: Flatten role configs, fix replica count warnings - #830

Open
adwk67 wants to merge 21 commits into
mainfrom
refactor/flatten-config-maps
Open

adwk67 wants to merge 21 commits into
mainfrom
refactor/flatten-config-maps

Conversation

@adwk67

@adwk67 adwk67 commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Description

Part of https://github.com/stackabletech/internal-issues/issues/167.

Overview

  • the main change is in controller/mods.rs, where the two role-keyed maps are replaced with 3 pairs of <role>_config and <role>_role_group_configs, e.g. journalnode_config and journalnode_role_group_configs
  • this means we can remove AnyNodeConfig and the associated downcasts
  • a role-keyed map remains in one place, as RoleGroupResources::stateful_sets needs to be ordered such that STSs are rolled out in the correct/expected order
  • the role is passed to the shared builders as a type parameter and not as an argument, and the role and role group configs are treated as pairs linked by the type so that the role group has to contain the correct type of config
--- PASS: kuttl (2312.70s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/cluster-operation_hadoop-latest-3.5.0_zookeeper-latest-3.9.5_openshift-false (290.95s)
        --- PASS: kuttl/harness/profiling_hadoop-3.5.0_zookeeper-latest-3.9.5_openshift-false (158.81s)
        --- PASS: kuttl/harness/smoke_hadoop-3.5.0_zookeeper-3.9.4_zookeeper-latest-3.9.5_number-of-datanodes-2_datanode-pvcs-2hdd-1ssd_listener-class-external-unstable_openshift-false (150.09s)
        --- PASS: kuttl/harness/smoke_hadoop-3.5.0_zookeeper-3.9.4_zookeeper-latest-3.9.5_number-of-datanodes-2_datanode-pvcs-2hdd-1ssd_listener-class-cluster-internal_openshift-false (159.24s)
        --- PASS: kuttl/harness/smoke_hadoop-3.5.0_zookeeper-3.9.5_zookeeper-latest-3.9.5_number-of-datanodes-2_datanode-pvcs-2hdd-1ssd_listener-class-cluster-internal_openshift-false (792.26s)
        --- PASS: kuttl/harness/topology-provider_hadoop-latest-3.5.0_zookeeper-latest-3.9.5_krb5-1.21.1_kerberos-backend-mit_openshift-false (256.92s)
        --- PASS: kuttl/harness/kerberos_hadoop-3.5.0_zookeeper-latest-3.9.5_krb5-1.21.1_opa-latest-1.16.2_kerberos-realm-CLUSTER.LOCAL_kerberos-backend-mit_openshift-false (1017.50s)
        --- PASS: kuttl/harness/kerberos_hadoop-3.5.0_zookeeper-latest-3.9.5_krb5-1.21.1_opa-latest-1.16.2_kerberos-realm-PROD.MYCORP_kerberos-backend-mit_openshift-false (1014.88s)
        --- PASS: kuttl/harness/smoke_hadoop-3.5.0_zookeeper-3.9.5_zookeeper-latest-3.9.5_number-of-datanodes-2_datanode-pvcs-2hdd-1ssd_listener-class-external-unstable_openshift-false (160.07s)
        --- PASS: kuttl/harness/logging_hadoop-3.5.0_zookeeper-latest-3.9.5_openshift-false (400.25s)
        --- PASS: kuttl/harness/orphaned-resources_hadoop-latest-3.5.0_zookeeper-latest-3.9.5_openshift-false (121.74s)
PASS

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains comments
  • (Integration-)Test cases added
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@adwk67 adwk67 self-assigned this Sep 14, 2026
@adwk67 adwk67 changed the title refactor: Flatten role_configs into per-role fields refactor: Flatten role configs into per-role fields, and fix the replica count warnings Sep 14, 2026
@adwk67 adwk67 changed the title refactor: Flatten role configs into per-role fields, and fix the replica count warnings refactor: Flatten role configs, fix replica count warnings Sep 14, 2026
@adwk67
adwk67 marked this pull request as ready for review September 15, 2026 15:53
@siegfriedweber
siegfriedweber self-requested a review September 16, 2026 07:03
@adwk67 adwk67 mentioned this pull request Sep 16, 2026
2 of 16 tasks

@siegfriedweber siegfriedweber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before going into the details of this PR, I want to discuss the general approach.

Comment thread rust/operator-binary/src/controller/build/resolve.rs
@siegfriedweber
siegfriedweber added this pull request to stack #837 September 29, 2026 07:11
siegfriedweber
siegfriedweber previously approved these changes Oct 5, 2026

@siegfriedweber siegfriedweber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this pull request together with #833. Therefore, I did not comment on changes which were introduced here and reverted in #833.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants