Install Nextcloud apps on chart install
Right now, we install Nextcloud apps in a postStart setup script. This has some disadvantages:
- it takes a long time before Nextcloud is considered ready to serve requests, so it's down for a couple a minutes whenever the pod is (re)started;
- if there is any (temporary) problem with downloading any of the apps, this becomes a problem for that cluster: Nextcloud might be unavailable -- although we have made improvements to let Nextcloud come up in this case -- or some apps might be unavailable. In either case, alerts fire and manual intervention is required.
I think we want to revert to the way this was done before: installing apps in a post-install (and post-upgrade) helm hook.
- Compared to the current situation, this solves the problem of slow and brittle nextcloud start-up.
- Compared to installing apps at docker build time (building our own nextcloud image), it's more flexible: at docker build time we don't have access to a running nextcloud instance, so we can't do the full app install, only download the app tarballs; also we would probably only do a single image build that runs on all clusters, so we can't easily customize it.
It's good though to realize that we switched from the post-install hook to the current postStart script because the hooks would occasionally go "out of sync" with the main nextcloud pod, by us making changes to the latter and forgetting to also update the former. I would hope that we can solve that by prudent use of helm template functions to factor out common parts.
Edited by Arie Peterson