-
Notifications
You must be signed in to change notification settings - Fork 56
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
Use a custom CA file for r10k control repo #212
Conversation
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.
@cpiment Truly awesome PR! Thank you! 🥇
Thank you for the chart! |
@cpiment Wanna be one of the official maintainers? We're a team of three people at present. |
Hi @Xtigyro! Thanks for the offering, I'm really flattered! However, I've never used helm before this chart and I don't know many things about developing and testing charts so I don't know if I would be a very good maintainer. I think I will try to contribute and learn for some time before taking that step, if that's OK with you. |
@cpiment Sure - and thank you once more! |
@cpiment @Xtigyro r10k-code.config.yaml needs to be updated, line 54.
|
@vibe Thanks! @cpiment Could you please fix that? FYI: @ldaneliukas @davidphay |
Sorry about the bug, I tested the suggested change in my environment and it seems to work fine, thanks for reporting! |
In my use case the control repo is in a private repository which is cloned via HTTPS. The Gitlab instance where the repo lives is behind a reverse proxy which serves the repositories, and that reverser proxy has a certificate issued by an internal CA.
In order for r10k to retrieve the repository, I have had to configure the
netrc
file, which was already present in the chart but not documented (#211), and find a way for r10k to handle the custom CA of my Gitlab instance.This PR adds two new configuration settings:
r10k.code.viaHttps.customCa.cert.value
: A multiline file where the custom CA certificate chain can be stored in PEM format. This certificate is stored inside ther10k-code-secret
within thecert
key.r10k.code.viaHttps.customCa.existingSecret
: A secret reference which must store the certificate chain in PEM format inside thecert
keyThe certificate is mounted as
~/code-certs/ca.pem
file in the container where r10k is running and then this command is launched in the entry point of the container:The template
r10k.code.viaHttps.customCa.repoUrl
extracts the base URL from thepuppetserver.puppeturl
, so git can check if the TLS certificate from the HTTPS repository matches the custom CA.I have bumped the version and changelog of the chart, but it you need more changes or me to modify anything, please contact me.