Feature: Reduce Mounting time of large PVs
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.