-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[bitnami/mongodb] Adding tls.pemChainIncluded value to support wider range of TLS certificates #16731
Conversation
…ill allow secrets which contain certificates to only need the tls.key and tls.crt attributes. The assumption is that the tls.crt attribute contains a certificate chain. The generate-tls-certs initilization container will then split the certificate chain, using the first certificate as the leafnode and use in combination with tls.key for the /certs/mongodb.pem file. The remaining certificates in the chain will be placed in the /certs/mongodb-ca-cert file as the intermediary nodes. This supports the usage of cert-manager.io as there are cases where the secret returned by this controller do not include the ca.crt file. Signed-off-by: Douglas Thomson <[email protected]>
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.
The changes LGTM. I've just suggested two minor changes.
Thanks for contributing.
Returning original indentation and removing changes out of scope. Signed-off-by: Douglas Thomson <[email protected]>
@dgomezleon - The amendments have been made. Thank you for the review. |
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.
Thank you @dtrts.
Signed-off-by: David Gomez <[email protected]>
Description of the change
Adding the option tls.pemChainIncluded to values.
When enabled this treats the
tls.crt
attribute as a certificate chain, with the assumption that the first certificate is the leaf node, and the remaining certificates are the intermediaries.The generate-tls-certs init container will then split this file, using the leaf node and tls.key for the /certs/mongodb.pem file and the remaining certificates for the /certs/mongodb-ca-cert file.
Benefits
This will enable users to use a wider range of certificates. Specifically ACME validated certificates from cert-manager which do not return the
ca.crt
attribute in the secret.Possible drawbacks
Depending on how mutual TLS is configured, and how the cert manager is configured, the pem chain may not be suitable / or easily constructed in such an order.
It will also perform this file operation on all certificates when supplying multiple for replicasets or hidden nodes.
I feel that is a user is using certificates from different sources for each node then they have bigger problems to worry about!
Applicable issues
Additional information
This is mimicking a change to the Kafa chart #9422
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.README.md
using readme-generator-for-helm