rancher-cron
rancher-cron copied to clipboard
Support Self-Signed SSL
If you use self-signed SSL to use rancher throught SSL, you get certification authority error when rancher-cron try to reach metadata. It should add ca.crt from /var/lib/rancher/etc/ssl/ca.crt same used by rancher agent itself.
Do you mean this? I would imagine you still need to add cert yourself via a volume.
Yes, you have to add the CA on that path. I guess the agent would load that path automatically and run update-ca-certs to add ca inside OS boundle. Anyway the cron isn't aware of that. I guess you could add an entrypoint to update certificates before running CMD.
I think this is the line that add CA.crt to agent here. Running as --privileged can get that crt easily.
Ok. To summarize, we should pass an env var, that if present, loads those options into the client init.
Then, add to readme instructions on how to create a volume and set that env var in case of self-signed cert.
I don't currently have time to work on this, but PRs are welcome. It should be a relatively straightforward change.