This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Backport of Add fix for when we need to use the system-wide trusted CAs into release/0.5.x#460
Merged
andrewstucki merged 2 commits intorelease/0.5.xfrom Nov 18, 2022
Conversation
added 2 commits
November 18, 2022 18:54
89c8dce to
530fb06
Compare
andrewstucki
approved these changes
Nov 18, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #459 to be assessed for backporting due to the inclusion of the label backport/0.5.x.
The below text is copied from the body of the original PR.
Changes proposed in this PR:
This adds the simplest path for supporting the helm option
externalServer.useSystemRoots. Since the controller always passes in a value to the deployment viaCONSUL_CACERTwhen the controller knows that the Consul connections are served over TLS, we leverage the fact that it's going to write an empty file to disk that the deployment will then try and use as a file.Rather than doing a larger re-write of the deployment code to handle cases in which TLS is configured but no certs are passed in (when you want to validate with system-wide certs), I added some code that handles the invalid certificates being passed in, in which case we just fallback to using the system-wide certs. What this entails is:
CONSUL_CACERTis valid.CONSUL_USE_SSLis set to mark that this still needs to talk over SSLHow I've tested this PR:
Verified this on HCP with
useSystemRoots, with a local consul server node and the self-signed certs that go with it, and with a local node and TLS disabled. These were validated with the changes in hashicorp/consul-k8s#1743.Checklist:
Overview of commits