nomad healthcheck doesn't work when TLS is enabled
I'm using nomad-1.2.6-r0
on Alpine 3.15.4
If you setup Nomad with TLS as instructed by
https://learn.hashicorp.com/tutorials/nomad/security-enable-tls
the bare nomad
command can no longer communicate with the nomad server when it tries to run nomad agent-info
during the healthcheck. I think we need to have command line args available to the healthcheck in /etc/conf.d/nomad
. Something like
nomad_healthcheck_opts="-ca-cert=nomad-ca.pem -client-cert=cli.pem -client-key=cli-key.pem address=https://127.0.0.1:4646"
and update /etc/init.d/nomad
with:
healthcheck() {
$command agent-info ${nomad_healthcheck_opts} > /dev/null 2>&1
}
Edited by James Moore