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

K8SPS-173: K8SPS-173: Log setting safe size if the unsafe config is not allowed #524

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api/v1alpha1/perconaservermysql_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi

if cr.Spec.MySQL.ClusterType == ClusterTypeGR && !cr.Spec.AllowUnsafeConfig {
if cr.Spec.MySQL.Size < MinSafeGRSize {
log.Info("Setting safe defaults, updating MySQL cluster size", "oldSize", cr.Spec.MySQL.Size, "newSafeSize", MinSafeGRSize)
cr.Spec.MySQL.Size = MinSafeGRSize
}

Expand All @@ -646,6 +647,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi

if cr.RouterEnabled() && !cr.Spec.AllowUnsafeConfig {
if cr.Spec.Proxy.Router.Size < MinSafeProxySize {
log.Info("Setting safe defaults, updating Router size", "oldSize", cr.Spec.Proxy.Router.Size, "newSafeSize", MinSafeProxySize)
cr.Spec.Proxy.Router.Size = MinSafeProxySize
}
}
Expand All @@ -656,6 +658,7 @@ func (cr *PerconaServerMySQL) CheckNSetDefaults(ctx context.Context, serverVersi

if cr.HAProxyEnabled() && !cr.Spec.AllowUnsafeConfig {
if cr.Spec.Proxy.HAProxy.Size < MinSafeProxySize {
log.Info("Setting safe defaults, updating HAProxy size", "oldSize", cr.Spec.Proxy.HAProxy.Size, "newSafeSize", MinSafeProxySize)
cr.Spec.Proxy.HAProxy.Size = MinSafeProxySize
}
}
Expand Down
Loading