-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix: h-scale opsRequest validation considers replicas and shards limit #8834
base: main
Are you sure you want to change the base?
fix: h-scale opsRequest validation considers replicas and shards limit #8834
Conversation
…30/kubeblocks into bugfix/improve_scalein_validate
minNum, maxNum := 0, 16384 | ||
if comSpec.ComponentDef != "" { | ||
compDef := &appsv1.ComponentDefinition{} | ||
if err := cli.Get(ctx, client.ObjectKey{Name: comSpec.ComponentDef, Namespace: r.Namespace}, compDef); err != nil { |
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.
It should only be obtained when h-scale.
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.
this validate function is only called when h-scale
minNum, maxNum := 0, 2048 | ||
if spec.ShardingDef != "" { | ||
shardingDef := &appsv1.ShardingDefinition{} | ||
if err := cli.Get(ctx, types.NamespacedName{Name: spec.ShardingDef, Namespace: r.Namespace}, shardingDef); err != nil { |
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.
Ditto.
fix #8737
add a validation rule that a opsRequest considers replicas and shards limit