fix(chart): remove unused volume mounts and DB secret from nginx container - #170
Open
danielqb wants to merge 1 commit into
Open
fix(chart): remove unused volume mounts and DB secret from nginx container#170danielqb wants to merge 1 commit into
danielqb wants to merge 1 commit into
Conversation
…ainer ## Problem The nginx container in glpi-deployment.yaml mounted the files, marketplace, and etc PersistentVolumeClaims (ReadWriteOnce) even though nginx's actual config (default.conf) never reads from those paths - it only serves static assets from /var/www/html/public (baked into the image) and proxies everything else to php-fpm via fastcgi_pass. It also pulled glpi-secret (DB credentials) via envFrom despite never connecting to the database. Since both nginx and php-fpm mounted the same RWO PVCs, a cluster without explicit pod affinity forcing them onto the same node could schedule them on different nodes, causing FailedMount/ContainerCreating for whichever pod lands second. ## Fix Removed the files/marketplace/etc volumeMounts and volumes, and the glpi-secret envFrom, from the nginx container. Only php-fpm (which is the only container that actually touches GLPI_VAR_DIR/marketplace/etc and the database) keeps these. nginx now only mounts nginx-conf. This also reduces blast radius: nginx no longer has DB credentials in its environment (least privilege). ## Testing - helm lint: 0 failures - helm template: nginx Deployment renders with only nginx-conf volume, no envFrom block
Contributor
|
This project requires RWX persistent volume claim because php-fpm and nginx access same volume. |
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
The nginx container in glpi-deployment.yaml mounted the files, marketplace,
and etc PersistentVolumeClaims (ReadWriteOnce) even though nginx's actual
config (default.conf) never reads from those paths - it only serves static
assets from /var/www/html/public (baked into the image) and proxies
everything else to php-fpm via fastcgi_pass. It also pulled glpi-secret
(DB credentials) via envFrom despite never connecting to the database.
Since both nginx and php-fpm mounted the same RWO PVCs, a cluster without
explicit pod affinity forcing them onto the same node could schedule them
on different nodes, causing FailedMount/ContainerCreating for whichever
pod lands second.
Fix
Removed the files/marketplace/etc volumeMounts and volumes, and the
glpi-secret envFrom, from the nginx container. Only php-fpm (which is
the only container that actually touches GLPI_VAR_DIR/marketplace/etc
and the database) keeps these. nginx now only mounts nginx-conf.
This also reduces blast radius: nginx no longer has DB credentials in
its environment (least privilege).
Testing
no envFrom block