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

feat: compatible with cronjob v1beta1 #6687

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Conversation

ldming
Copy link
Collaborator

@ldming ldming commented Feb 26, 2024

Fix:

The pull request fixes issues related to backups failing on Kubernetes 1.20, which only supports CronJob v1beta1 instead of v1.

The main changes include:

  • Add CRD conversion between CronJob v1 and v1beta1 APIs. A new package "compat_client" is added to handle the conversion.
  • Update controllers and actions to use compat client.

@github-actions github-actions bot added the size/XL Denotes a PR that changes 500-999 lines. label Feb 26, 2024
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 50.92025% with 80 lines in your changes are missing coverage. Please review.

Project coverage is 66.45%. Comparing base (9f91f8c) to head (fbdd445).

Files Patch % Lines
pkg/dataprotection/utils/compat_client.go 52.74% 35 Missing and 8 partials ⚠️
pkg/dataprotection/utils/volumesnapshot.go 8.69% 21 Missing ⚠️
pkg/dataprotection/action/action_create_vs.go 60.00% 0 Missing and 4 partials ⚠️
...ollers/dataprotection/backupschedule_controller.go 70.00% 2 Missing and 1 partial ⚠️
pkg/dataprotection/backup/deleter.go 40.00% 2 Missing and 1 partial ⚠️
controllers/dataprotection/backup_controller.go 60.00% 1 Missing and 1 partial ⚠️
pkg/dataprotection/utils/utils.go 71.42% 2 Missing ⚠️
pkg/dataprotection/action/action_job.go 83.33% 0 Missing and 1 partial ⚠️
pkg/dataprotection/restore/manager.go 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6687      +/-   ##
==========================================
+ Coverage   66.43%   66.45%   +0.01%     
==========================================
  Files         304      305       +1     
  Lines       36507    36503       -4     
==========================================
+ Hits        24254    24257       +3     
+ Misses      10163    10160       -3     
+ Partials     2090     2086       -4     
Flag Coverage Δ
unittests 66.45% <50.92%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ldming ldming merged commit 74dd34c into main Feb 26, 2024
83 of 84 checks passed
@ldming ldming deleted the support/compatible-cronjob-v1beta1 branch February 26, 2024 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature size/XL Denotes a PR that changes 500-999 lines.
Projects
None yet
4 participants