-
Notifications
You must be signed in to change notification settings - Fork 53
add CleanupDeploymentClusterToStandalone #456
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haorenfsa The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #456 +/- ##
==========================================
+ Coverage 76.62% 76.68% +0.06%
==========================================
Files 65 66 +1
Lines 6044 6094 +50
==========================================
+ Hits 4631 4673 +42
- Misses 1160 1164 +4
- Partials 253 257 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR adds functionality to automatically clean up cluster-mode deployments when a Milvus instance is transitioned to standalone mode. The implementation ensures that cluster components are only deleted after the standalone deployment is ready, preventing service disruption during the transition.
Key changes:
- Adds
ReconcileDeploymentClusterToStandalonefunction to detect and delete non-standalone deployments when in standalone mode - Waits for standalone deployment readiness before deleting cluster components
- Includes comprehensive test coverage for various scenarios including multiple deployment modes and edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pkg/controllers/deployment_cluster_to_standalone.go | New implementation that filters cluster deployments, checks standalone readiness, and deletes cluster components |
| pkg/controllers/deployment_cluster_to_standalone_test.go | Comprehensive test suite covering cluster mode skip, no cleanup scenarios, readiness checks, and multi-deployment deletion |
| pkg/controllers/deployments.go | Integration point that calls the new cleanup function during deployment reconciliation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7804645 to
5bdf9b7
Compare
Signed-off-by: haorenfsa <haorenfsa@gmail.com>
5bdf9b7 to
6b4c25a
Compare
Signed-off-by: haorenfsa <haorenfsa@gmail.com>
This pull request introduces logic to automatically clean up cluster-mode component deployments when switching a Milvus instance to standalone mode, ensuring a smooth transition and resource cleanup. It adds a new method for this cleanup, comprehensive tests for various scenarios, and integrates the cleanup step into the deployment reconciliation process.
Cluster-to-Standalone Cleanup Logic:
CleanupDeploymentClusterToStandalonemethod indeployment_cluster_to_standalone.goto:Testing Enhancements:
deployment_cluster_to_standalone_test.gowith comprehensive test cases covering:Integration with Reconciliation Flow:
CleanupDeploymentClusterToStandaloneinReconcileDeployments.