-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nginx-php fails health check with persistance enabled #4
Comments
My config: nginx-php.yaml ---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: nginx-phpfm
spec:
interval: 5m
chart:
spec:
chart: nginx-phpfpm
version: 0.0.2
sourceRef:
kind: HelmRepository
name: drpsychick-charts
namespace: flux-system
interval: 5m
# Values link:
values:
nginx:
image:
tag: "1.21.0"
phpfpm:
image:
tag: "8-fpm-alpine"
persistence:
enabled: true
existingClaim: nginx-php-config-v1 config-php.yaml ---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginx-php-config-v1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: rook-ceph-block kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: http
resources:
- config-pvc.yaml
- nginx-phpfm.yaml
- ``` |
Hey @truxnell , thanks for reporting this! I would actually prefer to go with option 1
Not because it's easiest, but because the "health" of the service really depends on what you deploy and how you want to report if it is healthy. In the end, the provided Example: if your PHP application requires/uses database access, the health check should fail until the database is accessible. |
Let me know if the merged solution (make the path configurable, so you can use whatever script path you want, to run health checks) works for you @truxnell |
I've just used/setup the nginx-php helm chart and encountered a issue.
I noted that it works fine when not using a persistent volume, but the NGINX container fails its health check on
health.php
with a 404 when using a existing claim persistent volume.I found that
health.php
was missing when using a persistent volume, and I fixed mine by just creating the file manually (via vscode attached to the the working php container)This makes sense to me as I suspect the pvc mount is overwriting the configmap
health.php
, causing a fail for the liveness check.Suggestions to fix:
health.php
manually if you use a persistent volume (easyiest)health.php
over the top of the pvc mount datahealth.php
over to the /var/www/html directory if missing.Apologies for not raising a PR to fix, but I'm not versed enough in helm to know the best approach.
The text was updated successfully, but these errors were encountered: