feat(chart): add optional HorizontalPodAutoscaler for php-fpm and nginx - #176
Open
danielqb wants to merge 1 commit into
Open
feat(chart): add optional HorizontalPodAutoscaler for php-fpm and nginx#176danielqb wants to merge 1 commit into
danielqb wants to merge 1 commit into
Conversation
## Problem Neither php-fpm nor nginx could scale automatically based on load; only a fixed replicaCount was supported. ## Fix - Added templates/glpi-hpa.yaml with independent autoscaling/v2 HPAs for php-fpm and nginx, each gated behind its own `autoscaling.enabled` (default false). Supports CPU and/or memory utilization targets (either can be left empty to omit that metric). - glpi-deployment.yaml now omits the `replicas` field entirely when autoscaling.enabled is true for that component, so `helm upgrade` doesn't fight the HPA by resetting replicas back to replicaCount on every release (a well-known Helm+HPA footgun otherwise). - Documented the shared-storage caveat directly in values.yaml: scaling php-fpm beyond 1 replica requires glpi.persistence.files to use a ReadWriteMany-capable storageClass, since GLPI_VAR_DIR (uploads, sessions) is read/written by every replica. ## Testing - helm lint: 0 failures - helm template (default): no HPA rendered, Deployments still set `replicas: 1` explicitly - helm template --set glpi.phpfpm.autoscaling.enabled=true --set glpi.nginx.autoscaling.enabled=true: both HPAs render targeting the correct Deployment names; Deployments no longer set `replicas` at all
eduardofraga
requested changes
Jul 28, 2026
eduardofraga
left a comment
Contributor
There was a problem hiding this comment.
Move files from kubernetes/glpi to helm/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Neither php-fpm nor nginx could scale automatically based on load; only
a fixed replicaCount was supported.
Fix
php-fpm and nginx, each gated behind its own
autoscaling.enabled(default false). Supports CPU and/or memory utilization targets
(either can be left empty to omit that metric).
replicasfield entirely whenautoscaling.enabled is true for that component, so
helm upgradedoesn't fight the HPA by resetting replicas back to replicaCount on
every release (a well-known Helm+HPA footgun otherwise).
php-fpm beyond 1 replica requires glpi.persistence.files to use a
ReadWriteMany-capable storageClass, since GLPI_VAR_DIR (uploads,
sessions) is read/written by every replica.
Testing
replicas: 1explicitlyglpi.nginx.autoscaling.enabled=true: both HPAs render targeting the
correct Deployment names; Deployments no longer set
replicasat all