feat: rewrite controller as validated pipeline stages#703
Draft
adwk67 wants to merge 3 commits into
Draft
Conversation
Introduce the framework module with compile-time validated string wrapper types (attributed_string_type macro) and typed Kubernetes/operator name types. Ported from the opensearch-operator reference implementation. All code is currently unused and will be wired into the controller in subsequent commits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port remaining framework modules from the opensearch-operator reference: builder (meta, pdb, pod, statefulset), kvp labels, product logging, cluster resources, controller utils, role/role-group utilities. These provide infallible wrappers around stackable-operator builder APIs and type-safe resource name derivation with compile-time length assertions. All code is currently unused and will be wired into the controller in the next commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the monolithic controller with a structured pipeline of validate → build → apply → update_status stages. Each stage operates on validated, type-safe data rather than raw CRD types. Remove discovery.rs, operations/, and service.rs modules whose logic has been absorbed into the new pipeline. Trim listener.rs and kerberos.rs to their shared helpers now that pod-building logic lives in controller/build.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
These PRs are primarily for validating the refactoring process and can be ignored, merged, closed etc. as we see fit.
Summary
frameworkmodule with validated string wrapper types, infallible builder helpers, and compile-time name length assertions (ported from opensearch-operator)Commits
attributed_string_typemacro,HasName/HasUid/NameIsValidLabelValuetraitsValidatedHiveCluster,RoleGroupBuilder, unit tests; deletesdiscovery.rs,service.rs, andoperations/42 files changed, +5993 -1676
Test plan
cargo clippy --all-targets— zero warningscargo test— all tests passcargo doc --document-private-items— zero doc warnings🤖 Generated with Claude Code