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

Include namespace resource needed by namespaced-scope resource in backup #6320

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented May 29, 2023

Thank you for contributing to Velero!

Please add a summary of your change

For some use cases, namespaced-scope resources are inluded into backup, but the namespaces are not included due to filters setting. To do this, removing label selector filter from namespace resource. Namespace resource only honor namespace exclude/include filters.

Does your change fix a particular issue?

Fixes #6302

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@blackpiglet blackpiglet self-assigned this May 29, 2023
@github-actions github-actions bot added has-e2e-tests has-unit-tests Website non-docs changes for the website labels May 29, 2023
@github-actions github-actions bot removed Website non-docs changes for the website has-e2e-tests labels May 29, 2023
@blackpiglet blackpiglet marked this pull request as ready for review May 29, 2023 12:39
@blackpiglet blackpiglet requested review from ywk253100 and removed request for sseago May 29, 2023 12:40
pkg/backup/backup.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #6320 (613dd4a) into main (9467d7c) will increase coverage by 2.03%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #6320      +/-   ##
==========================================
+ Coverage   40.97%   43.01%   +2.03%     
==========================================
  Files         255      222      -33     
  Lines       23830    22704    -1126     
==========================================
+ Hits         9764     9765       +1     
+ Misses      13304    12174    -1130     
- Partials      762      765       +3     
Impacted Files Coverage Δ
pkg/backup/backup.go 53.94% <80.00%> (+2.06%) ⬆️

... and 35 files with indirect coverage changes

@blackpiglet blackpiglet requested a review from sseago June 1, 2023 05:38
@blackpiglet blackpiglet force-pushed the 6302-fix branch 4 times, most recently from 328c88f to 43bc608 Compare June 1, 2023 08:17
For some use cases, namespaced-scope resources are inluded into backup,
but the namespaces are not included due to filters setting.
To do this, removing label selector filter from namespace resource.
Namespace resource only honor namespace exclude/include filters.

Signed-off-by: Xun Jiang <[email protected]>
pkg/backup/item_collector.go Show resolved Hide resolved
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.

namespace object should always been backed up if any objects in it are backed up
5 participants