[oadp-1.4] OADP-8835: feat(bsl): concatenate all CA certificates from BSLs and include system defaults - #2466
Conversation
…BSLs and include system defaults (openshift#1969) * feat(bsl): concatenate all CA certificates from BSLs and include system defaults Instead of using "first one wins" approach, now collects and concatenates all unique CA certificates from BackupStorageLocations. Also includes system default CA certificates when custom certificates are present. Changes: - Modified processCACertForBSLs() to collect all unique CA certificates - Added deduplication logic to avoid including same certificate multiple times - Added getSystemCACertificates() helper to retrieve system CA bundles - System defaults are only included when custom CAs are present - Updated tests to verify concatenation and deduplication behavior This allows for more flexible multi-cloud/multi-endpoint configurations where different BSLs may require different CA certificates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(bsl): ensure BSL reconciliation preserves default field to avoid conflicts with Velero management Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * feat(bsl): enhance CA certificate processing for multiple BSLs and add tests for validation Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * PEM verify + `podman run -v `pwd`:`pwd` -w `pwd` quay.io/konveyor/builder:ubi9-v1.23 sh -c "make lint-fix"` Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * refactor(nginx): reorganize deployment YAML structure to be compatible with e2e Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> * feat(e2e): add CA certificate handling for default e2e BSL in multiple test files Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> --------- Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com> Co-authored-by: Claude <noreply@anthropic.com> (cherry picked from commit dcead30)
Content scanning: findings recorded for this branchContent scanning recorded the following findings for this branch.
AI-generated. Review for accuracy. Maintained automatically; edits are overwritten. |
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@redhat-chai-bot: This pull request references OADP-8835 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: redhat-chai-bot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restore gofmt import ordering in controllers/bsl_test.go. The cherry-pick of openshift#1969 left github.com/stretchr/testify/assert out of gofmt import order, which makes `make test` fail at the fmt-isupdated gate (CI runs `make test submit-coverage`). Combined with the DPA/CloudStorage namespace alignment already on this branch, TestProcessCACertForBSLs now passes and `make test` is green (unit tests, fmt, api, and bundle checks all pass). Signed-off-by: Chai Bot <chai-bot@redhat.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Please upload reports for the commit 9a0d516 to get more accurate results.
Additional details and impacted files@@ Coverage Diff @@
## oadp-1.4 #2466 +/- ##
============================================
+ Coverage 39.37% 40.03% +0.65%
============================================
Files 30 30
Lines 5211 5378 +167
============================================
+ Hits 2052 2153 +101
- Misses 2959 3014 +55
- Partials 200 211 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/retest-required AI-generated. Review for accuracy. |
|
/retest |
kaovilai
left a comment
There was a problem hiding this comment.
@redhat-chai-bot check Restore the DPA controller owner reference on velero-ca-bundle. The original #1969 calls controllerutil.SetControllerReference, while #2466 does not. Without it, DPA deletion will not garbage-collect the ConfigMap. Add the owner reference inside the CreateOrPatch callback and test it.
|
@kaovilai Good catch — I'll add the AI-generated. Review for accuracy. |
|
/retest AI-generated. Review for accuracy. |
|
@redhat-chai-bot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Cherry-pick of #1969 to oadp-1.4.
Changes
This cherry-picks the BSL CA certificate concatenation feature (OADP-6765/OADP-8835) from
oadp-1.5tooadp-1.4.The automatic
/cherry-pick oadp-1.4had merge conflicts due to structural differences between the branches (oadp-1.4 usescontrollers/package withDPAReconciler, while oadp-1.5 usesinternal/controller/withDPAController). All conflicts were resolved by adapting the changes to oadp-1.4's codebase patterns.Conflict Resolution Summary
dpa.BackupImages()guard around CA cert processing, keeping oadp-1.4's method signatureprocessCACertificatesForVelero(dpa, deploy, container)validatePEMCertificate, BSL get-before-create pattern, Default field preservation, rewrittenprocessCACertForBSLswith dedup/filtering/system CAs,getSystemCACertificates— all usingDPAReconcileranddpaparameter patternDPAReconciler,getFakeClientFromObjects, andnewContextForTest(name)controllers/bsl.goinstead)Verification
go build ./...passes(cherry pick of commit dcead30)
AI-generated. Review for accuracy.
@sseago requested via Chai Bot