-
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
Iba plugins #8054
Iba plugins #8054
Conversation
PR is currently tagged as a draft PR until #8026 is merged, since this PR branch depends on that one. PR lists 2 commits, but one of these is the commit from #8026, which will go away once that one is merged and this PR is rebased. Please limit review comments here to the "Internal ItemBlockAction plugins" commit -- comments on the other commit should be made on PR #8026. |
bbd94c2
to
e387e0c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8054 +/- ##
==========================================
- Coverage 58.77% 58.76% -0.02%
==========================================
Files 358 364 +6
Lines 30070 30188 +118
==========================================
+ Hits 17674 17739 +65
- Misses 10949 10996 +47
- Partials 1447 1453 +6 ☔ View full report in Codecov by Sentry. |
6cb5062
to
d671b5d
Compare
@sseago |
@Lyndon-Li Yes. This PR adds new plugins, registers the plugins, but the backup workflow logic will never call them. The changes to the BIA plugins here are just refactoring to pull out common logic (in cases where BIA additional items and IBA related items are generated with similar code), but BIA behavior itself will not change. I will do some more testing in my dev cluster before moving this out of draft, though. (also, note that the PR E2E tests pass with these changes in the PR). |
@sseago
|
I had initially considered that. However, I also realized that we may need ItemBlock functionality on restore in the future when we go to implement VolumeGroupSnapshot support, so it probably makes sense to create a v2 ItemBlockAction with an added GetRestoreRelatedItems func, since they will probably share code with the backup func. Keeping it out of backup gives us this extra flexibility. Also, since
That's a good idea. I think |
bd65259
to
c43a3e4
Compare
Yes, I also realize that |
The issue is that my current thinking is that if/when we need to expand ItemBlock functionality to restore, the best way to handle this on the plugin side will be to create an ItemBlockActionv2 plugin version which simply adds a new API method |
In addition to the above, throughout the backup code, Velero tends to use the word "actions" to mean "BackupItemActions" (for example the "resolvedActions" field in backup.Request) -- so that will add to the confusion if itemblockaction files are added to the "backup/actions" dir. |
This PR implements the internal ItemBlockAction plugins needed for pod, PVC, and SA. Signed-off-by: Scott Seago <sseago@redhat.com>
Thank you for contributing to Velero!
Please add a summary of your change
Implements ItemBlockAction plugins for internal types:
In addition to returning the related items corresponding to existing BIA plugins (PVC for pod, PV for PVC, etc.), the PVC ItemBlockAction also returns the pods mounting the PVC to handle the case of an RWX volume that's mounted by multiple pods. With this IBA plugin, once the ItemBlock functionality is added, pre- and post- hooks on pods mounting the same PVC will be coordinated.
Does your change fix a particular issue?
Second PR for #7900 (but not the complete feature)
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.