-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Adding Support For VolumeAttributes in Resource Policy #8383
Conversation
Signed-off-by: mayaggar <[email protected]>
Signed-off-by: mayaggar <[email protected]>
Signed-off-by: mayaggar <[email protected]>
Signed-off-by: mayaggar <[email protected]>
Signed-off-by: mayaggar <[email protected]>
Signed-off-by: mayaggar <[email protected]>
@mayankagg9722 Thank you for the contribution! |
Thanks @ywk253100, I have added both the description about the proposal as well as the use case in the Summary section above, Can you please go through it once and let me know in case any more details are required? |
Signed-off-by: mayaggar <[email protected]>
Hello @ywk253100, please check I have added the design spec now in this PR. Thanks! |
@mayankagg9722 Would you be able to work on extending the Volume Policy criteria for labelSelector and names as well ? |
@shubham-pampattiwar are you suggesting a new PR for a combined design? |
Signed-off-by: mayaggar <[email protected]>
@shubham-pampattiwar thanks for tagging your issue, I will definitely try to pick this up post this. Currently only prioritizing to complete this PR for adding one more CSI filter. Thanks! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8383 +/- ##
==========================================
+ Coverage 58.95% 59.00% +0.05%
==========================================
Files 367 368 +1
Lines 38902 39015 +113
==========================================
+ Hits 22933 23022 +89
- Misses 14507 14530 +23
- Partials 1462 1463 +1 ☔ View full report in Codecov by Sentry. |
design/Implemented/supporting-volumeattributes-resource-policy.md
Outdated
Show resolved
Hide resolved
design/Implemented/supporting-volumeattributes-resource-policy.md
Outdated
Show resolved
Hide resolved
Signed-off-by: mayaggar <[email protected]>
…into mainbackup
Signed-off-by: mayaggar <[email protected]>
Co-authored-by: Tiger Kaovilai <[email protected]> Signed-off-by: Mayank Aggarwal <[email protected]>
@mayankagg9722 Could you check the CI failure? |
design/Implemented/supporting-volumeattributes-resource-policy.md
Outdated
Show resolved
Hide resolved
Signed-off-by: mayaggar <[email protected]>
@ywk253100 & @kaovilai can you please approve? All the checks have passed now. Thanks! |
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.
Thanks
https://velero.io/docs/v1.15/resource-filtering/#supported-volumepolicy-actions should be updated from this PR as well. |
Summary of the changes
Currently Velero Resource policies are only supporting "Driver" to be filtered in CSI volume conditions
We are adding support for filtering Persistent Volumes (PVs) based on additional VolumeAttributes properties under CSI PVs.
Use Case:
Customers asked to back up AFS (Azure file shares) and want to only backup SMB type of file share volumes and not NFS file share volumes.
How Provisioning happens:
Define the Storage class with
protocol: nfs
under storage class parameters to provision CSI NFS Azure File Shares.Link: https://learn.microsoft.com/en-us/azure/aks/azure-files-csi#nfs-file-shares
The same
protocol:nfs
property will be floated to the PersistentVolumes as part of CSI VolumeAttributes.Constraints with current Velero Resource Policies:
As the current resource policies only offer to filter based on the driver type, we are bringing an additional filter VolumeAttributes to extend and allow customer to skip/snapshot only certain types of persistent volumes for the same driver.
Sample AFS NFS PV attached below:
Please indicate you've done the following:
make new-changelog
) or comment/kind changelog-not-required
on this PR.site/content/docs/main
.