-
Notifications
You must be signed in to change notification settings - Fork 53
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
Kubernetes: Fix file uploads #771
Conversation
gXkch
commented
Mar 11, 2024
- This fixes a server error caused by missing volumeMounts on the Squest container. A securityContext is needed too since the user ID is 999.
- Also sets the volumes on the NGINX container to readOnly to match with the docker-compose deployment.
- Move the ldap_config.py file to the Squest container.
- Add missing django-media volumeMounts
Not sure that static is needed as it's served by nginx. |
Do you have the logs concerning the error you get so we can try to reproduce? |
This is the log I get in the squest container when trying to access an uploaded portfolio image:
I have not set a securityContext and neither have I configured any volume Mounts on the squest container. However, when I do set the securityContext to 999 and mount /app/media in the Squest container I am able to load / display the image in the browser. I had the issue that the Squest container did not have permissions to create directories / files in the volume when I did NOT set the securityContext to 999. Upon further testing I do agree that /app/static is only needed in the NGINX container and I will remove this mound from the Squest container. |
Indeed the squest image user named "django" is using id 999. |
Then how do you handle the migration job which also sets the fsGroup to 999? squest/k8s/squest_k8s/tasks/05-django.yml Lines 116 to 117 in dc6c147
|
Oh yes it's there already 😅. |
Could you Squash your commit into a single one? |
Done. |
Thank you for your contribution. |