-
Notifications
You must be signed in to change notification settings - Fork 94
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
Increase pvc size #391
Increase pvc size #391
Conversation
cd2586a
to
7f32de7
Compare
Warning for the upgrading path:
Otherwise upgrade path might fail. Should the operator provide upgrade path? Can be checked if pvc has been provisioned dinamically AND the storageclass suppports resize? |
// v1.ResourceStorage must exist, otherwise PVC is regarded as invalid | ||
existingSize := existing.Spec.Resources.Requests[v1.ResourceStorage] | ||
|
||
if existingSize.Cmp(desiredSize) != 0 { |
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.
I seem to remember there were some comparison methods that checked unexported fields, and that made detecting differences due to different internal representations of the same value depending on the serialized value. Have we checked this is working as expected in all cases?
That's why helper.CmpResources was created in its day for other kind of resources. I don't remember whether CmpResources takes into account ResourceStorage though
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.
CmpResources does not take into account ResourceStorage. Already checked it.
The upgrade logic uses Quantity
type comparator, which I expect to be working
func main() {
desired := resource.MustParse("10Gi")
existing := resource.MustParse("1Gi")
fmt.Println("desired == existing", existing.Cmp(desired) == 0)
existing = resource.MustParse("10Gi")
fmt.Println("desired == existing", existing.Cmp(desired) == 0)
}
desired == existing false
desired == existing true
That's a concerning issue yes... I'm also concerned about increasing x10 storage requirements of a 3scale installation. Let's talk about this a little bit through other channels. |
Code Climate has analyzed commit 1cdb3c2 and detected 6 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Closing this issue as:
A better way to go is:
|
Increase PVC resource request: