-
Notifications
You must be signed in to change notification settings - Fork 459
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
Add PVC expansion logic for MinIO Operator #2196
Conversation
a4c8066
to
7a00c03
Compare
@harshavardhana @dvaldivia Please review my PR when you are free. Thank you. |
Let me talk to the right people and evaluate |
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 works for DirectPV storage class.
@balamurugana May I ask if this PR can be merged? |
@jiuker if this will cause STS issue, should we merge?... |
tenant => generate statuefulset => update the statuefulset storage, will update failed, non-modifiable fields / if use patch, pod will restart. @cniackz
|
@cniackz , your question has nothing to do with this PR. This PR will only update PVC according to CR without updating the STS. |
I think this is relevant, this is not a complete pr, if only expand pvc, without considering the statefulset update error, I think it is inappropriate. operator/pkg/controller/main-controller.go Lines 1284 to 1312 in 9d45aba
|
@jiuker It is in |
If necessary, we can revert or fix it later on, as I don't see any issues on my end. |
@cesnietor @fengyinqiao Checked. There have an case must be fixed. Resize pvc and then update the image. |
@jiuker Is this logic causing the problem? If that's the case, I think this logic needs to be restructured. It's not possible to update all fields of STS completely. Instead, like this logic, we should selectively update some fields of STS: Similarly, when you update the |
Yesh. |
This below snippet needs to be fixed, but this fix has nothing to do with this PR, even without this PR, there is a problem, for it's not possible to update all fields of STS completely. @cniackz @jiuker If I have time, I will propose a new PR to fix it, but to be clear, this is a known bug, not caused by this PR. |
Yesh. We know that. Please send a pr fix this. |
Add PVC Expansion Logic for MinIO Operator
Summary
This PR adds functionality to automatically expand PersistentVolumeClaims (PVCs) when the storage capacity specified in the MinIO Tenant Custom Resource Definition (CRD) changes.
Changes
pvc.go
to handle PVC expansion logic.syncHandler
inmain-controller.go
to call the new PVC expansion function.pvc_test.go
to validate PVC expansion functionality.Testing
Documentation
pvc.go
to explain the logic.Checklist
golint
andgo vet
.