Skip to content
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 labels as a criteria for volume policy #8713

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

shubham-pampattiwar
Copy link
Collaborator

Thank you for contributing to Velero!

Please add a summary of your change

Implementation for design #8503

Does your change fix a particular issue?

Fixes #8256

Please indicate you've done the following:

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 79.51807% with 17 lines in your changes missing coverage. Please review.

Project coverage is 59.53%. Comparing base (9235fe1) to head (f756a6d).
Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
pkg/backup/item_backupper.go 33.33% 7 Missing and 3 partials ⚠️
pkg/podvolume/backupper.go 0.00% 4 Missing ⚠️
internal/volumehelper/volume_policy_helper.go 83.33% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8713      +/-   ##
==========================================
+ Coverage   59.51%   59.53%   +0.02%     
==========================================
  Files         371      371              
  Lines       40179    40191      +12     
==========================================
+ Hits        23911    23927      +16     
+ Misses      14775    14767       -8     
- Partials     1493     1497       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

kaovilai
kaovilai previously approved these changes Feb 20, 2025
Copy link
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. This matches the current design.

sseago
sseago previously approved these changes Feb 20, 2025
kaovilai
kaovilai previously approved these changes Feb 20, 2025
sseago
sseago previously approved these changes Feb 20, 2025
kaovilai
kaovilai previously approved these changes Feb 20, 2025
Signed-off-by: Shubham Pampattiwar <[email protected]>

add changelog file

Signed-off-by: Shubham Pampattiwar <[email protected]>

handle err

Signed-off-by: Shubham Pampattiwar <[email protected]>

use labels selector.matches

Signed-off-by: Shubham Pampattiwar <[email protected]>

make update

Signed-off-by: Shubham Pampattiwar <[email protected]>

remove fetching pvc from volume policy filtering

Signed-off-by: Shubham Pampattiwar <[email protected]>

add more ut coverage

Signed-off-by: Shubham Pampattiwar <[email protected]>
Copy link
Collaborator

@sseago sseago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is going in the right direction, but a couple of suggestions in my review comments.

sseago
sseago previously approved these changes Feb 22, 2025
@Lyndon-Li
Copy link
Contributor

@shubham-pampattiwar Some minor changes suggested, please have another look. Thanks!

Signed-off-by: Shubham Pampattiwar <[email protected]>

use VolumeFilterData struct in GetMatchAction func

Signed-off-by: Shubham Pampattiwar <[email protected]>

update parsePVC func and add more ut

Signed-off-by: Shubham Pampattiwar <[email protected]>

lint fix

Signed-off-by: Shubham Pampattiwar <[email protected]>
@sseago sseago merged commit 0eb1040 into vmware-tanzu:main Feb 26, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: Extend Volume Policy criteria to include label selector
5 participants