Feature: Reduce Mounting time of large PVs
Nobody has claimed this yet.
- Dominant language
- Go Template
- Stars
- 534
- Forks
- 314
- Avg merge
- 42m
- Merged PRs (30d)
- 1
Description
Description of the change
Add the following by default to the nextcloud.podSecurityContext: fsGroupChangePolicy: "OnRootMismatch"
Benefits
I am mounting several large PVs with media archives. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ states that setting fsGroup will make Kubernetes recursively change ownership and permissions for the contents of each volume. This takes about 30 minutes in my case.
Setting fsGroupChangePolicy: "OnRootMismatch" reduces this to just several seconds.
Possible drawbacks
It is probably not guaranteed that every file has the proper group permissions. However, I did not recognize any problems when syncing and opening files and folders (and cards and calenders) in nextcloud.
Also, the log of the nextcloud container gives some warnings:
Warning: /var/www/html/config/apache-pretty-urls.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apache-pretty-urls.config.php
Warning: /var/www/html/config/apcu.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apcu.config.php
Warning: /var/www/html/config/apps.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apps.config.php
Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
Warning: /var/www/html/config/swift.config.php differs from the latest version of this image at /usr/src/nextcloud/config/swift.config.php
Warning: /var/www/html/config/upgrade-disable-web.config.php differs from the latest version of this image at /usr/src/nextcloud/config/upgrade-disable-web.config.php
It seems that the files only differ by 1 byte (an additional line feed at the end of the file). But I am not sure if this could have side effects when a new image version is rolled out.
Additional information
None, I think.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Helm chart's definition of nextcloud.podSecurityContext and inspect how its defaults are rendered into the pod security context. Confirm the default includes fsGroupChangePolicy: "OnRootMismatch", then verify the rendered Kubernetes manifest and assess the reported configuration-file warnings during rollout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100