FEAT: Allow client side TLS for Docker hosts (#2852)

* FEAT: Allow client side TLS for Docker hosts

Inlcude TLS certificate in HTTPS requests when certificate
files are locally available to Kuma for a host.

* fix: refactor to satisfy linter requirements

* fix: linter
This commit is contained in:
Marcell Fülöp
2023-08-04 16:49:33 +02:00
committed by GitHub
parent a032e11a2e
commit bce4835362
2 changed files with 59 additions and 4 deletions

View File

@@ -720,6 +720,9 @@ class Monitor extends BeanModel {
options.socketPath = dockerHost._dockerDaemon;
} else if (dockerHost._dockerType === "tcp") {
options.baseURL = DockerHost.patchDockerURL(dockerHost._dockerDaemon);
options.httpsAgent = CacheableDnsHttpAgent.getHttpsAgent(
DockerHost.getHttpsAgentOptions(dockerHost._dockerType, options.baseURL)
);
}
log.debug("monitor", `[${this.name}] Axios Request`);