nextcloud / nextcloud/helm

Feature: Reduce Mounting time of large PVs

Open
#659 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.