-
Notifications
You must be signed in to change notification settings - Fork 38
🐛 Fix OCI client configuration logic #252
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
🐛 Fix OCI client configuration logic #252
Conversation
This commit fixes the logic deciding to create a TLS client for OCI charts. The existing code was creating a non-TLS configured client if either the CA file was unspecified or if `insecureSkipTLSVerify` was set to false. If a CA file was specified then `insecureSkipTLSVerify` is false, which meant that a non-TLS client was always created, causing cert validation failures if the OCI registry is served over TLS. This commit changes the logic to create a non-TLS configured client if both CA file is unset and `insecureSkipTLSVerify` is false.
/cc @mboersma |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jimmidyson, mboersma The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
**What problem does this PR solve?**: Upgrade CAAPH to 0.2.4 This release includes fixes needed for supporting CAAPH in airgap environment. 🌱 Use upstream cluster RESTConfig utility by @jimmidyson in kubernetes-sigs/cluster-api-addon-provider-helm#248 🐛 Fix OCI client configuration logic by @jimmidyson in kubernetes-sigs/cluster-api-addon-provider-helm#252 🐛 pointer checks if user doesn't specify CASecret by @faiq in kubernetes-sigs/cluster-api-addon-provider-helm#253 **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
This commit fixes the logic deciding to create a TLS client for OCI
charts.
The existing code was creating a non-TLS configured client if either the CA file
was unspecified or if
insecureSkipTLSVerify
was set to false. If a CAfile was specified then
insecureSkipTLSVerify
is always false, which meantthat a non-TLS client was always created, causing cert validation
failures if the OCI registry is served over TLS.
This commit changes the logic to create a non-TLS configured client if
both CA file is unset AND
insecureSkipTLSVerify
is false.