From 9ddb614d1470683f1e5dad83c0b8216b8850fc1c Mon Sep 17 00:00:00 2001 From: Jack Henschel <jack.henschel@cern.ch> Date: Mon, 18 Sep 2023 14:43:52 +0200 Subject: [PATCH] Fix php-fpm healthchecks --- el9/templates/deployment.yaml | 3 +++ el9/values.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/el9/templates/deployment.yaml b/el9/templates/deployment.yaml index f293d0b..c308515 100644 --- a/el9/templates/deployment.yaml +++ b/el9/templates/deployment.yaml @@ -89,6 +89,9 @@ spec: dnsConfig: options: - name: single-request + # We are not using service-discovery based on environment variables + # https://kubernetes.io/docs/tutorials/services/connect-applications-service/#environment-variables + enableServiceLinks: false restartPolicy: Always serviceAccountName: {{ .Release.Name }} # We want to limit the permissions on directories mounted by the httpd container to not allow users diff --git a/el9/values.yaml b/el9/values.yaml index c41c379..9efb341 100644 --- a/el9/values.yaml +++ b/el9/values.yaml @@ -156,6 +156,8 @@ containers: - | # check that PHP-FPM is responding function check_php_fpm { + # "env -i" runs the command without extra environment variables + env -i \ SCRIPT_NAME=/ping \ SCRIPT_FILENAME=/ping \ REQUEST_METHOD=GET \ @@ -175,6 +177,8 @@ containers: - | # check that PHP-FPM is responding function check_php_fpm { + # "env -i" runs the command without extra environment variables + env -i \ SCRIPT_NAME=/ping \ SCRIPT_FILENAME=/ping \ REQUEST_METHOD=GET \ -- GitLab