Fix health check for jobservice and regctl

need cert when mTLS is enabled

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2020-04-09 20:35:46 +08:00
parent 08ff622310
commit e907cbe2b6
2 changed files with 2 additions and 2 deletions

View File

@ -18,6 +18,6 @@ USER harbor
VOLUME ["/var/log/jobs/"] 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"] ENTRYPOINT ["/harbor/entrypoint.sh"]

View File

@ -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 && 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"] VOLUME ["/var/lib/registry"]