Skip to content
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

refactor: Cluster Controller split and new Component and ComponentDefinition API support #5732

Merged
merged 286 commits into from
Nov 14, 2023

Conversation

Y-Rookie
Copy link
Collaborator

@Y-Rookie Y-Rookie commented Nov 1, 2023

Breaking Changes:

  • The logic of the Cluster Controller has been partially divided into the newly added Component API and Component Controller. The architecture of KubeBlocks has shifted from Cluster-> RSM -> K8S Resources to Cluster-> Component -> RSM -> K8S Resources.
  • The ClusterDefinition and ClusterVersion have been refactored, introducing the new ComponentDefinition API to replace the previous architecture based on ClusterDefinition (CD) and ClusterVersion (CV). Now, one CD combined with one CV can be mapped to multiple ComponentDefinitions. In the near future, CD and CV may be deprecated or undergo further evolution.
  • The new ComponentDefinition API introduces additional functionality and improved scalability (although some features are not yet implemented), such as ConnCredential and Service at the Component level, as well as more customizable Actions for lifecycle management.

TODO:

  • Improve test cases and coverage
  • Adaptation and improvement of peripheral functionalities, such as backup, resource constraints, lorry, and mutual referencing between components
  • Comprehensive testing with multiple engines, including testing for smooth migration from the old version API to the new version API
  • kbcli Adapts to the new componentDefinition API.

fix: #1458

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 1054 lines in your changes are missing coverage. Please review.

Comparison is base (aa60838) 70.15% compared to head (d15698f) 68.35%.
Report is 1 commits behind head on main.

Files Patch % Lines
controllers/apps/transformer_component_workload.go 69.78% 125 Missing and 56 partials ⚠️
controllers/apps/transformer_component_status.go 60.00% 128 Missing and 46 partials ⚠️
controllers/apps/transformer_component_rbac.go 53.07% 74 Missing and 10 partials ⚠️
controllers/apps/componentdefinition_controller.go 74.73% 51 Missing and 21 partials ⚠️
controllers/apps/transformer_cluster_credential.go 52.11% 64 Missing and 4 partials ⚠️
...rs/apps/transformer_component_account_provision.go 61.48% 37 Missing and 15 partials ⚠️
...llers/apps/transformer_component_custom_volumes.go 21.05% 43 Missing and 2 partials ⚠️
controllers/apps/transformer_component_account.go 57.14% 29 Missing and 4 partials ⚠️
controllers/apps/transformer_component_tls.go 65.26% 25 Missing and 8 partials ⚠️
...ntrollers/apps/transformer_component_credential.go 48.27% 21 Missing and 9 partials ⚠️
... and 28 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5732      +/-   ##
==========================================
- Coverage   70.15%   68.35%   -1.80%     
==========================================
  Files         256      286      +30     
  Lines       30734    32802    +2068     
==========================================
+ Hits        21560    22422     +862     
- Misses       7408     8544    +1136     
- Partials     1766     1836      +70     
Flag Coverage Δ
unittests 68.35% <68.33%> (-1.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leon-inf
Copy link
Contributor

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Nov 14, 2023
@Y-Rookie
Copy link
Collaborator Author

/approve

@Y-Rookie Y-Rookie merged commit 1cf0c3b into main Nov 14, 2023
44 checks passed
@Y-Rookie Y-Rookie deleted the feature/component-definition branch November 14, 2023 11:15
@github-actions github-actions bot added this to the Release 0.8.0 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test area/user-interaction refactor size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
6 participants