-
Notifications
You must be signed in to change notification settings - Fork 209
K8SPXC-1688 feat: add support for extraPVCs #2128
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
525 changes: 525 additions & 0 deletions
525
config/crd/bases/pxc.percona.com_perconaxtradbclusters.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
VolumeClaimTemplates in a StatefulSet cannot be modified after creation. If we try to add extra PVCs to an existing StatefulSet, we will get an error like:
This means that adding extra pvcs on a running cluster will not work and only fresh cluster will be able to utilize this feature, so we have a major limitation by approaching it like that.
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.
Can we consider cascading deletion here? In the code, there is an existing example here.
Ref: https://kubernetes.io/docs/tasks/administer-cluster/use-cascading-deletion/#set-orphan-deletion-policy
Uh oh!
There was an error while loading. Please reload this page.
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.
Given the use case you shared on the GH issue you originally opened,
I believe we should approach this in a slightly different angle. We can only consider adding as extra pvcs, actual pvcs that are created externally and contain the data we want already. Then these PVCs are going to be available for all sts pods with either read or write permissions (accepting all the individual storage type limitations and potential risks of the shared storage). The implementation for that is different from what we have right now available on this PR, but it is more suitable for the use case you are describing and indeed is valid.
For having the operator create additional PVCs and mount them, as you suggested an approach is the cascade deletion, but this can have various other implications that maybe are out of the context of this issue we are describing here.
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.
Hi @eminaktas , do you have time to finish it? We want to include it in PXCO 1.19.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.
Hi @hors, I am a bit tight with my works currently. If someone wish to take over, I’d be great but I can work with my best effort.
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.
@gkech To be clear, what is your suggestion?
Also, We should consider
sidecarPVCswhich works in the similar way. I implemented this feature using exinstingsidecarPVCsimplementation as an example. Can you also help me understand that part as well?Uh oh!
There was an error while loading. Please reload this page.
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.
For now to only implement the configuration and mounting of an existing PVC that was created independently of the operator workflow. So you have a single PVC with all the data you need, PVC which all the database pod can access and use. That would solve the need you are describing in the Github Issue you opened, right?
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.
Since we would like to introduce the related to the extra pvcs change to the next operator release, we prepared this PR: #2276, let us know if it works for you
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.
@gkech Thanks for taking ownership of this — I wasn’t able to get back to it earlier. The changes in this PR work for us as well.
We also have a use case where we want to attach local-disk PVCs to MySQL instances on each host. I see that this isn’t covered here, which makes sense since my original PR focused on that part. We can address that use case separately later on if it’s something that would be useful for the project as well.
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.
@eminaktas we created a separate ticket to address the case: https://perconadev.atlassian.net/browse/K8SPXC-1764
We will close this PR for now since the original issue described was addressed with the extra PVCs fix. If you feel that you've got the time to address the new ticket, please, by all means, go for it and let us know :)