health check: use https only when https enabled with non-self signed cert

This commit is contained in:
Joerg Stoever 2024-09-20 12:03:31 +09:00 committed by Kazunori Kimura
parent ac9e1fe14d
commit 38be108bc0

View File

@ -1855,7 +1855,7 @@ generate_healthcheck_script() {
# configure healthcheck script
## https://docs.gitlab.com/ee/user/admin_area/monitoring/health_check.html
local HEALTHCHECK_PROTOCOL="http"
if [[ "${GITLAB_HTTPS}" == true ]]; then
if [[ "${GITLAB_HTTPS}" == true && "${SSL_SELF_SIGNED}" == false ]]; then
HEALTHCHECK_PROTOCOL="${HEALTHCHECK_PROTOCOL}s"
fi
cat > /usr/local/sbin/healthcheck <<EOF