-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Description
When deploying the Factorio Server using the Helm chart provided in this repository with NFS as the storage class, the chown command fails with a non-zero exit code during both the initialization and server startup scripts, preventing the server from starting.
Environment
- Helm Chart Version: 1.2.5
- Kubernetes Version: v1.29.2
- Storage Type: nfs-subdir-external-provisioner
Issue Details
The failure occurs when the scripts attempt to change ownership of directories to the factorio user and group. Since NFS typically restricts ownership changes, the chown command exits with an error, halting the initialization and server startup processes.
Workaround Implemented
As a temporary solution, I manually adjusted the deployment configuration by setting the PUID and PGID to align with the NFS-mounted volume’s permitted UID and GID. This workaround prevents the chown command from trying to change permissions, thus allowing the server startup process to proceed without encountering errors.
Suggested Changes
-
Configurability of
PUIDandPGID: Integrate the ability to configurePUIDandPGIDthrough environment variables directly in the Helm chart. This addition would provide flexibility in handling permissions with NFS storage and could prevent similar issues for other users. -
Reevaluate Ownership Changes in Initialization Container: Consider removing the ownership change commands in the initialization container. The subsequent command in the script sets directory permissions to 777, which suggests that altering ownership might be unnecessary and could be safely omitted to streamline the deployment process.
Conclusion
I am not fully familiar with Kubernetes and may have misconfigured some aspects. Therefore, I am open to feedback on whether this issue stems from a misconfiguration on my part or if it is a broader problem that needs addressing. I am willing to contribute a pull request to implement the suggested changes once we have consensus on the appropriate solution.
This permissions issue might be a recurring scenario for users deploying with NFS, and making these environment variables configurable via the Helm chart could provide a robust solution.
Thank you for your attention to this matter.