-
Notifications
You must be signed in to change notification settings - Fork 151
Suppress storage discrepancy error if external volume autoscaling is enabled #1897
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
@@ -216,7 +216,11 @@ func (r *ReconcilePerconaServerMongoDB) resizeVolumesIfNeeded(ctx context.Contex | |||
} | |||
|
|||
if requested.Cmp(actual) < 0 { | |||
return errors.Errorf("requested storage (%s) is less than actual storage (%s)", requested.String(), actual.String()) | |||
if !cr.Spec.ExternalVolumeAutoscaling { |
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.
AFAIU operator should not care about PVCs at all if this is enabled, am I right @terryyanko? If yes, we can early return at the top of the function if this enabled.
ExternalVolumeAutoscaling
might be disabled after an external autoscaler scales PVCs, we need to make sure this function covers that scenario.
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.
@egegunes Yeah good point. I was thinking the user may still want direct control over the PVC size (even with this option enabled) after the initial deploy if, for example, they wanted to scale the volume beyond the current size as determined by the autoscaler. That probably isn't a common use case though. I'll move it up per your suggestion.
commit: 4c34e71 |
CHANGE DESCRIPTION
Problem:
If using an external volume autoscaler for dynamic PVC resizing, the operator continually throws the below error if the volume is scaled beyond its initial spec.
Cause:
The operator is not currently aware of whether or not an external autoscaler is in use
Solution:
Provide an option to allow for external volume autoscaling
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability