-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat: support specified instance scale down #6958
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6958 +/- ##
==========================================
- Coverage 65.96% 65.77% -0.19%
==========================================
Files 340 340
Lines 41356 41391 +35
==========================================
- Hits 27279 27225 -54
- Misses 11754 11835 +81
- Partials 2323 2331 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
apis/apps/v1alpha1/cluster_types.go
Outdated
// | ||
// The sum of replicas across all InstanceTemplates should not exceed the total number of Replicas specified for the Component. | ||
// Any remaining replicas will be generated using the default template and will follow the default naming rules. | ||
// | ||
// +optional | ||
Instances []InstanceTemplate `json:"instances,omitempty"` |
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.
you add patchStrategy:"merge,retainKeys" patchMergeKey:"name"
to verify that template name
is the unique key
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.
fixed in: 1d29e88
/cherry-pick release-0.9 |
🤖 says: cherry pick action finished successfully 🎉! |
(cherry picked from commit f88b651)
Use Cases
Node Failure
When a physical fault occurs on a specific node, it is necessary to rebuild a replica and subsequently take the affected pod on that node offline.
Data Corruption
When the data of a particular pod is corrupted, it is necessary to rebuild a replica and subsequently take the affected pod offline.
Instance Unavailability
When a pod experiences availability issues such as slow or unresponsive behavior, the best practice is to create a new replica and subsequently take the affected pod offline.
Cluster API
Add the
OfflineInstances
field tospec.componentSpecs
in the Cluster API to describe the instances to be taken offline.OpsRequest API
Add the
offlineInstances
field to Ops to override the field in the Cluster.Test
Case 1: Specify Instance Offline
Create a 3-instance cluster and use Ops to specify taking the instance with ordinal 1 offline.
Expected result:
OfflineInstances
: