Skip to content

Add custom action type to volume policies#9540

Draft
sseago wants to merge 2 commits intovmware-tanzu:mainfrom
sseago:custom-volume-policy
Draft

Add custom action type to volume policies#9540
sseago wants to merge 2 commits intovmware-tanzu:mainfrom
sseago:custom-volume-policy

Conversation

@sseago
Copy link
Collaborator

@sseago sseago commented Feb 11, 2026

Thank you for contributing to Velero!

Please add a summary of your change

This adds a new volume policy action type "custom", intended to be used by external plugins which handle PVCs.

Does your change fix a particular issue?

Fixes #9505

Please indicate you've done the following:

Comment on lines +330 to +334
pv, err = kubeutil.GetPVForPVC(pvc, v.client)
if err != nil {
v.logger.WithError(err).Errorf("fail to get PV for PVC %s", pvc.Namespace+"/"+pvc.Name)
return false, err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will check later if this is ok. There's some areas that this need to not error for the new pending/lost PVC volume policy feature

@sseago sseago force-pushed the custom-volume-policy branch from accd26e to b6dafe8 Compare February 11, 2026 22:58
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 9.09091% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.50%. Comparing base (1315399) to head (ef8ffdb).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
internal/volumehelper/volume_policy_helper.go 4.61% 62 Missing ⚠️
.../plugin/utils/volumehelper/volume_policy_helper.go 0.00% 17 Missing ⚠️
pkg/backup/actions/csi/pvc_action.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9540      +/-   ##
==========================================
- Coverage   60.60%   60.50%   -0.10%     
==========================================
  Files         386      387       +1     
  Lines       36389    36589     +200     
==========================================
+ Hits        22054    22140      +86     
- Misses      12758    12861     +103     
- Partials     1577     1588      +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Tiger Kaovilai <[email protected]>
Signed-off-by: Scott Seago <[email protected]>
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.

Custom volume policy action support (to be implemented by external plugins)

2 participants