Do not use subPath for config volumeMounts
As is very briefly mentioned in the docs, kubernetes unfortunately does not support automatically updating volumes mounted with subPath when the underlying ConfigMap changes. This can cause quite the trouble when trying do upgrade Nextcloud via GitOps with configs supplied via Helm values.
https://github.com/nextcloud/helm/blob/21ab410aff551adae8ba1f961f344ba43066e243/charts/nextcloud/templates/deployment.yaml#L264
Perhaps we could find a solution that mounts the ConfigMap in its entirety to a directory?
Just discorvered #197, which has been fixed by PR #198. Yet for me the issue persists. I think the cause of this is (ironically) that I have activated persistence for my Nextcloud deployment. After an upgrade, new versions of changed configs do get mounted to their respective *.config.php files within the nextcloud container, yet there remains an aggregated config.php which retains the old values. It seems that nextcloud server does not regenerate that file.
can we do something like this instead of subpaths? 🤔
volumeMounts:
- name: nextcloud-main
mountPath: "/var/www/{{ ternary "root" (printf "%s/%s" .Values.nextcloud.persistence.subPath "root") (empty .Values.nextcloud.persistence.subPath) }}"
Will that work? And do we also need to address all the volumeMounts we have that have the same name if we do that? 🤔