Repository navigation
Add resources to the subPath permissions init container - #304
Open
CaioMartins968 wants to merge 2 commits into
Open
CaioMartins968 wants to merge 2 commits into
CaioMartins968 wants to merge 2 commits into
Conversation
[Medium impact] The PR appears safe to merge. Reviews (2) · Last reviewed commit: "Add resources to the subPath permissions..." · Reviewed by Greptile |
The fix-subpath-permissions init container added in frappe#297 declares no resources and they could not be configured. In a namespace with a ResourceQuota on CPU or memory (e.g. limits.memory), Kubernetes requires every container of a non-BestEffort pod, init containers included, to declare them, so pods using persistence subPath were rejected with FailedCreate. Add persistence.subPathPermissions.resources (default {}), rendered on the init container only when set. Backward compatible: with the default, the init container renders exactly as before.
CaioMartins968
force-pushed
the
feat/subpath-init-resources
branch
from
October 26, 2026 14:03
a78d01d to
9b66999
Compare
Contributor
Author
|
@revant Hello, apologies for sending so many messages. I saw that you merged my last PR—thank you for the trust! I did, however, notice a small improvement that could be made: allowing the |
When persistence.logs.existingClaim is the same claim as the worker's (the shared-PVC setup documented in frappe#297), every pod referenced that PVC in two volumes, "sites-dir" and "logs". The kubelet mounts the claim once and keeps waiting for the second volume, so the pods never leave ContainerCreating (reproduced on AKS 1.34 with Azure Files NFS; a pod mounting the claim from a single volume at both paths starts fine). Add the erpnext.logsVolumeName helper: when worker and logs persistence resolve to the same claim, logs are mounted from "sites-dir" with logs.subPath and the "logs" volume is not declared. This covers all deployments, jobs and the subPath permissions init container. Backward compatible: with distinct claims or emptyDir logs, the manifests render exactly as before.
There was a problem hiding this comment.
Reviews are paused because your organization has an unpaid invoice. Open billing settings to pay it and resume reviews.
This branch has not been deployed
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.
The fix-subpath-permissions init container added in #297 declares no resources and they could not be configured. In a namespace with a ResourceQuota on CPU or memory (e.g. limits.memory), Kubernetes requires every container of a non-BestEffort pod, init containers included, to declare them, so pods using persistence subPath were rejected with FailedCreate.
Add persistence.subPathPermissions.resources (default {}), rendered on the init container only when set. Backward compatible: with the default, the init container renders exactly as before.