From e907cbe2b69c1effcfe1c5dbf2f619cf211a2085 Mon Sep 17 00:00:00 2001 From: DQ Date: Thu, 9 Apr 2020 20:35:46 +0800 Subject: [PATCH] Fix health check for jobservice and regctl need cert when mTLS is enabled Signed-off-by: DQ --- make/photon/jobservice/Dockerfile | 2 +- make/photon/registryctl/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/make/photon/jobservice/Dockerfile b/make/photon/jobservice/Dockerfile index f328a24c1..8fddd4926 100644 --- a/make/photon/jobservice/Dockerfile +++ b/make/photon/jobservice/Dockerfile @@ -18,6 +18,6 @@ USER harbor VOLUME ["/var/log/jobs/"] -HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080/api/v1/stats || curl -k --fail -s https://127.0.0.1:8443/api/v1/stats || exit 1 +HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080/api/v1/stats || curl -sk --fail --key /etc/harbor/ssl/job_service.key --cert /etc/harbor/ssl/job_service.crt https://127.0.0.1:8443/api/v1/stats || exit 1 ENTRYPOINT ["/harbor/entrypoint.sh"] diff --git a/make/photon/registryctl/Dockerfile b/make/photon/registryctl/Dockerfile index 3b2bc87b0..c196feba2 100644 --- a/make/photon/registryctl/Dockerfile +++ b/make/photon/registryctl/Dockerfile @@ -14,7 +14,7 @@ RUN chown -R harbor:harbor /etc/pki/tls/certs \ && chown harbor:harbor /home/harbor/install_cert.sh && chmod u+x /home/harbor/install_cert.sh -HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080/api/health || curl -k --fail -s https://127.0.0.1:8443/api/health || exit 1 +HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080/api/health || curl -sk --fail --key /etc/harbor/ssl/registryctl.key --cert /etc/harbor/ssl/registryctl.crt https://127.0.0.1:8443/api/health || exit 1 VOLUME ["/var/lib/registry"]