Restart nextcloud on change in setup-apps
The setup-apps
script is stored in a configmap -- created by helm based on the apps
helm value. This script is mounted inside the main nextcloud pod. We run the script using kubectl exec
from a separate Job on helm post-install and post-upgrade.
This works, but if
-
setup-apps
changes, for example because of a change in theapps
value, and - the
nc-nextcloud
deployment doesn't change
then the deployment still has the old configmap mounted, and so the old version of the script gets run by the post-upgrade script.
Perhaps we can solve this by including a hash of the apps
value as an annotation on the deployment, but this is tricky because that's created by the upstream nextcloud chart, so we'd have to set it in the values.yaml
in our chart, so this only works if that particular helm value gets templated by the nextcloud chart