Repository navigation
oadp-1.5: OADP-6765: feat(bsl): concatenate all CA certificates from BSLs and include system defaults - #1969
Conversation
…em 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>
… conflicts with Velero management Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
Skipping CI for Draft Pull Request. |
|
@kaovilai: This pull request references OADP-6765 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. |
|
feedback from officehours:
|
|
…d tests for validation Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
9acd4cd to
dfacfd4
Compare
| caPaths := []string{ | ||
| "/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu | ||
| "/etc/pki/tls/certs/ca-bundle.crt", // RHEL/CentOS/Fedora | ||
| "/etc/ssl/ca-bundle.pem", // OpenSSL | ||
| "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", // RHEL 7+ | ||
| "/etc/ssl/cert.pem", // Alpine/OpenSSL | ||
| } |
There was a problem hiding this comment.
"/etc/pki/tls/certs/ca-bundle.crt"
works for wes oadp controller manager. softlinked to "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem"
We can consider just this single path if it has all we need for normal aws operations.
|
964b4ca
|
/retest |
|
tested w/ multiple apps, mysql-persistent and parks app w/ image streams etc. |
one test case failed. checking if flake |
964b4ca to
831815c
Compare
|
New changes are detected. LGTM label has been removed. |
|
@kaovilai hrm.. |
…e with e2e Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
…e test files Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
|
The added e2e cases is fixed. |
|
@kaovilai: 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. |
|
testing this again.. @kaovilai thanks for having it lined up and passing. |
|
I didn't change the single thing about the controller code since your last test so I expect same results |
|
ran through various tests again w/ multiple bsl and certs |
There was a problem hiding this comment.
Consider cert rotation, configmap rollout/updates to velero deployment.
kubernetes/kubernetes#22368
says to relink deployment to new configmap to propagate cert change
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, shubham-pampattiwar, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick oadp-dev |
|
@kaovilai: new pull request created: #1972 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 kubernetes-sigs/prow repository. |
|
/cherry-pick oadp-1.4 |
|
@sseago: #1969 failed to apply on top of branch "oadp-1.4": 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 kubernetes-sigs/prow repository. |
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>
…BSLs and include system defaults (#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)
Why the changes were made
How to test the changes made