Repository navigation
Add config options to enable TLS from cert files mounted to a dir on each pod by a cert-manager extension - #292
Merged
Conversation
… pod by a cert-manager extension
thelabdude
marked this pull request as draft
July 20, 2021 19:05
thelabdude
commented
Jul 22, 2021
HoustonPutman
left a comment
Contributor
There was a problem hiding this comment.
Small comments, looks good so far though!
Awaiting some wonderful additions to the TLS tests 😅
…mountedServerTLSDir to support a mountedClientTLSDir option in the future
thelabdude
marked this pull request as ready for review
July 30, 2021 18:25
HoustonPutman
approved these changes
Aug 3, 2021
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #291
The tricky part of this PR is the keystore password being in a file, but Solr (and the exporter) have no facility for loading the password from a file (Solr expects the
SOLR_SSL_KEY_STORE_PASSWORDENV VAR via theEnvSSLCredentialProvider) and the prometheus exporter expects these to come through thejavax.net.ssl.keyStorePasswordandjavax.net.ssl.trustStorePasswordJava system props ...So for the main Solr pod, I'm leveraging the initdb support in the Docker Solr framework to run a script in
/docker-entrypoint-initdb.dto export theSOLR_SSL_KEY_STORE_PASSWORDandSOLR_SSL_TRUST_STORE_PASSWORDenv vars by cat'ing out the password file(s) in the mounted dir. That's a bit onerous but the real rub is with the exporter, where it doesn't even work with theSOLR_SSL_KEY_STORE_PASSWORDandSOLR_SSL_TRUST_STORE_PASSWORDenv vars and expects the Java system properties. So had to resort to wrapping the entrypoint script to add these properties from the password file at runtime.Added basic unit tests to verify the config and reconcile around these new config options