-
Notifications
You must be signed in to change notification settings - Fork 2
feat(api): refactor v1alpha1 to parent/child model with scoped templates #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Closed
rytswd
reviewed
Dec 12, 2025
01289c0 to
8914340
Compare
rytswd
reviewed
Dec 15, 2025
rytswd
reviewed
Dec 16, 2025
Member
rytswd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, just a few suggestions added
Removes the `ComponentConfig` struct to prevent `CoreTemplate` from referencing other templates and to simplify the API structure. Changes: - Replaces `ComponentConfig` with a specialized `MultiAdminConfig` in `MultigresCluster`, enforcing "Spec OR TemplateRef" validation. - Updates `CoreTemplate` to use `StatelessSpec` directly for `MultiAdmin`, flattening the YAML structure (removing the `spec` nesting) and preventing recursive template references. - Deletes the unused `ComponentConfig` from `common_types.go`.
…ate scope Updates the `TopoServer` and `CoreTemplate` definitions to improve extensibility and strictness. Changes: - Updates `TopoServerSpec` (Child CR) to wrap its configuration under an `etcd` key. This creates a polymorphic structure that can be extended with other backends (e.g., `consul`) in the future without breaking changes. - Updates `CoreTemplate` to use `TopoServerSpec` for `GlobalTopoServer` instead of the cluster-level spec. This: 1. Prevents templates from referencing other templates (removing recursion risks). 2. Restricts templates to defining "Managed" workloads only, excluding environment-specific `external` configurations. - Consolidates the usage of `EtcdSpec` across both Parent and Child resources for consistent schema definitions.
rytswd
approved these changes
Dec 16, 2025
Member
rytswd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
Completely redesigns the API based on the latest design doc, moving from individual component CRDs to a single "MultigresCluster" source of truth supported by reusable templates and read-only child resources.
Key Changes:
CoreTemplate,CellTemplate, andShardTemplatetypes to support reusable configuration.shared_types.goto centralize common structs (StatelessSpec,ComponentConfig,StorageSpec) and prevent circular deps.toposerver_types.goto includeEtcdSpecandGlobalTopoServerRef, acting as the authoritative source for topology config.MultiOrchSpec,PoolSpec, andShardImagesintoshard_types.goto localize domain-specific logic.Cell,TableGroup, andShardto reflect their status as read-only, fully resolved child resources.Refactoring & Cleanup:
deploymenttemplate,etcd,multigateway, andmultiorch.SpecoverConfigfor managed resources).