-
Notifications
You must be signed in to change notification settings - Fork 175
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
chore: increase the range of maxReplicasLimit and set default value o… #7953
Conversation
8bb8de7
to
baf4605
Compare
baf4605
to
6ab4788
Compare
6ab4788
to
68b70ac
Compare
// +kubebuilder:validation:XValidation:rule="self.minReplicas <= self.maxReplicas",message="the minimum replicas limit should be no greater than the maximum" | ||
type ReplicasLimit struct { | ||
// The minimum limit of replicas. | ||
// | ||
// +kubebuilder:validation:Required | ||
MinReplicas int32 `json:"minReplicas"` | ||
// +kubebuilder:default=1 |
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.
Default 0 is a better choice when you scale a component replicas to 0 and get limit validation errors. Then you will have to update the component spec to admit such case. Anyway, default min 1 has too much implicit assumptions inside.
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.
Scale-in operations will delete PVCs.
Setting the minimum replica number to 1 is intended to prevent accidental deletion and data loss.
68b70ac
to
1924454
Compare
…f replicasLimit Signed-off-by: ian-hui <ianhuiii@sjtu.edu.cn>
1924454
to
41d371a
Compare
/cherry-pick release-0.9 |
🤖 says: Error cherry-picking. |
🤖 says: |
apecloud#7953) Signed-off-by: ian-hui <ianhuiii@sjtu.edu.cn> Co-authored-by: ian-hui <ianhuiii@sjtu.edu.cn>
resolve issue #7941